Package gnu.jel

Class LocalField

  • All Implemented Interfaces:
    java.lang.reflect.Member
    Direct Known Subclasses:
    LocalMethod

    public class LocalField
    extends java.lang.Object
    implements java.lang.reflect.Member
    Represents a field local to the class being compiled.
    • Field Summary

      • Fields inherited from interface java.lang.reflect.Member

        DECLARED, PUBLIC
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalField​(int modifiers, java.lang.Class<?> type, java.lang.String name, java.lang.Object constValue)
      Constructs a new local field.
    • Constructor Detail

      • LocalField

        public LocalField​(int modifiers,
                          java.lang.Class<?> type,
                          java.lang.String name,
                          java.lang.Object constValue)
        Constructs a new local field.
        Parameters:
        modifiers - field modifiers, a sum of one or more of PUBLIC, PRIVATE,PROTECTED, STATIC, FINAL,VOLATILE, TRANSIENT constants defined in java.lang.reflect.Modifier
        type - is a class representing the type of this field.
        name - is the name of this field.
        constValue - is the value of this field if it is static final, null otherwise.
    • Method Detail

      • getDeclaringClass

        public java.lang.Class<?> getDeclaringClass()
        Specified by:
        getDeclaringClass in interface java.lang.reflect.Member
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface java.lang.reflect.Member
      • getModifiers

        public int getModifiers()
        Specified by:
        getModifiers in interface java.lang.reflect.Member
      • getType

        public java.lang.Class<?> getType()
      • isSynthetic

        public boolean isSynthetic()
        Specified by:
        isSynthetic in interface java.lang.reflect.Member
      • getConstValue

        public java.lang.Object getConstValue()
        Returns a value of the public static final field.

        Fails assertion if called on the field which is not public static final.

        Returns:
        value of the field, object of wrapped primitive type or string.