jwharm / java-gi

GObject-Introspection bindings generator for Java
GNU Lesser General Public License v2.1
93 stars 9 forks source link

Annotation to define GObject properties #63

Closed jwharm closed 1 year ago

jwharm commented 1 year ago

This adds a new @Property annotation that can be used with getter and setter methods in Java code to define GObject properties.

Example usage:

@Property(name = "n-items", type = ParamSpecInt.class, writable = false)
public int getNItems() {
    return items.size();
}

The property definitions in the ListIndexModel utility class now use this annotation.