Class ClosureExpression

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ClosureExpression extends Expression
An expression using a custom GClosure to compute the value from its parameters.
  • Constructor Details

    • ClosureExpression

      public ClosureExpression(MemorySegment address)
      Create a ClosureExpression instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ClosureExpression

      public ClosureExpression(Type valueType, Closure closure, @Nullable Expression @Nullable [] params)

      Creates a GtkExpression that calls closure when it is evaluated.

      closure is called with the this object and the results of evaluating the params expressions.

      Parameters:
      valueType - the type of the value that this expression evaluates to
      closure - closure to call when evaluating this expression. If closure is floating, it is adopted
      params - expressions for each parameter
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ClosureExpression class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected ClosureExpression asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Expression
      Returns:
      the instance as if it were its parent type