Class ConstantExpression

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ConstantExpression extends Expression
A constant value in a GtkExpression.
  • Constructor Details

    • ConstantExpression

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

      public ConstantExpression(Type valueType, Object... varargs)
      Creates a GtkExpression that evaluates to the object given by the arguments.
      Parameters:
      valueType - The type of the object
      varargs - arguments to create the object from
  • Method Details

    • getType

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

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

      protected ConstantExpression 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
    • forValue

      public static ConstantExpression forValue(Value value)
      Creates an expression that always evaluates to the given value.
      Parameters:
      value - a GValue
      Returns:
      a new GtkExpression
    • getValue

      public Value getValue()
      Gets the value that a constant expression evaluates to.
      Returns:
      the value