Class TryExpression
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gtk.Expression
org.gnome.gtk.TryExpression
- All Implemented Interfaces:
Proxy
A GtkExpression that tries to evaluate each of its expressions until it succeeds.
If all expressions fail to evaluate, the GtkTryExpression's evaluation fails as well.
- Since:
- 4.22
-
Nested Class Summary
Nested classes/interfaces inherited from class Expression
Expression.Expression$Impl -
Constructor Summary
ConstructorsConstructorDescriptionTryExpression(MemorySegment address) Create a TryExpression instance for the provided memory address.TryExpression(@Nullable Expression @Nullable [] expressions) Creates aGtkExpressionwith an array of expressions. -
Method Summary
Modifier and TypeMethodDescriptionprotected TryExpressionasParent()Return this instance as if it were its parent type.static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the TryExpression class.Methods inherited from class Expression
bind, evaluate, getValueType, isStatic, ref, unref, watchMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TryExpression
Create a TryExpression instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TryExpression
Creates a
GtkExpressionwith an array of expressions.When evaluated, the
GtkTryExpressiontries to evaluate each of its expressions until it succeeds. If all expressions fail to evaluate, theGtkTryExpression's evaluation fails as well.The value type of the expressions in the array must match.
- Parameters:
expressions- The array of expressions- Since:
- 4.22
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code.- Overrides:
asParentin classExpression- Returns:
- the instance as if it were its parent type
-