Package org.gnome.gtk
Class PropertyExpression
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gtk.Expression
org.gnome.gtk.PropertyExpression
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gnome.gtk.Expression
Expression.ExpressionImpl
-
Constructor Summary
ConstructorDescriptionPropertyExpression
(MemorySegment address) Create a PropertyExpression proxy instance for the provided memory address.PropertyExpression
(Type thisType, @Nullable Expression expression, String propertyName) Creates an expression that looks up a property. -
Method Summary
Modifier and TypeMethodDescriptionprotected PropertyExpression
asParent()
Returns this instance as if it were its parent type.static PropertyExpression
forPspec
(@Nullable Expression expression, ParamSpec pspec) Creates an expression that looks up a property.Gets the expression specifying the object of a property expression.getPspec()
Gets theGParamSpec
specifying the property of a property expression.static Type
getType()
Get the GType of the PropertyExpression classMethods inherited from class org.gnome.gtk.Expression
bind, evaluate, getValueType, isStatic, ref, unref, watch
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getMemoryLayout, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
PropertyExpression
Create a PropertyExpression proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
PropertyExpression
public PropertyExpression(Type thisType, @Nullable @Nullable Expression expression, String propertyName) Creates an expression that looks up a property.The object to use is found by evaluating the
expression
, or using thethis
argument whenexpression
isNULL
.If the resulting object conforms to
this_type
, its property namedproperty_name
will be queried. Otherwise, this expression's evaluation will fail.The given
this_type
must have a property withproperty_name
.- Parameters:
thisType
- The type to expect for the this typeexpression
- Expression to evaluate to get the object to query orNULL
to query thethis
objectpropertyName
- name of the property
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type.- Overrides:
asParent
in classExpression
-
forPspec
public static PropertyExpression forPspec(@Nullable @Nullable Expression expression, ParamSpec pspec) Creates an expression that looks up a property.The object to use is found by evaluating the
expression
, or using thethis
argument whenexpression
isNULL
.If the resulting object conforms to
this_type
, its property specified bypspec
will be queried. Otherwise, this expression's evaluation will fail.- Parameters:
expression
- Expression to evaluate to get the object to query orNULL
to query thethis
objectpspec
- theGParamSpec
for the property to query- Returns:
- a new
GtkExpression
-
getExpression
Gets the expression specifying the object of a property expression.- Returns:
- the object expression
-
getPspec
Gets theGParamSpec
specifying the property of a property expression.- Returns:
- the
GParamSpec
for the property
-