Class ConstantFieldInfo

java.lang.Object
com.oracle.truffle.compiler.ConstantFieldInfo

public final class ConstantFieldInfo extends Object
Value returned by TruffleCompilerRuntime.getConstantFieldInfo(ResolvedJavaField) describing how a field read can be constant folded based on Truffle annotations.
  • Field Details

    • CHILD

      public static final ConstantFieldInfo CHILD
      Denotes a field is annotated by com.oracle.truffle.api.nodes.Node.Child.
    • CHILDREN

      public static final ConstantFieldInfo CHILDREN
      Denotes a field is annotated by com.oracle.truffle.api.nodes.Node.Children.
  • Method Details

    • isChild

      public boolean isChild()
      Determines if this object is CHILD.
    • isChildren

      public boolean isChildren()
      Determines if this object is CHILDREN.
    • getDimensions

      public int getDimensions()
      Gets the number of array dimensions to be marked as compilation final. This value is only non-zero for array type fields.
      Returns:
      a value between 0 and the number of declared array dimensions (inclusive)
    • forDimensions

      public static ConstantFieldInfo forDimensions(int dimensions)
      Gets a ConstantFieldInfo object for a field.
      Parameters:
      dimensions - the number of array dimensions to be marked as compilation final
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object