Package gnu.jel
Class LocalField
java.lang.Object
gnu.jel.LocalField
- All Implemented Interfaces:
Member
- Direct Known Subclasses:
LocalMethod
Represents a field local to the class being compiled.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLocalField
(int modifiers, Class<?> type, String name, Object constValue) Constructs a new local field. -
Method Summary
-
Constructor Details
-
LocalField
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.Modifiertype
- 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 Details
-
getDeclaringClass
- Specified by:
getDeclaringClass
in interfaceMember
-
getName
-
getModifiers
public int getModifiers()- Specified by:
getModifiers
in interfaceMember
-
getType
-
isSynthetic
public boolean isSynthetic()- Specified by:
isSynthetic
in interfaceMember
-
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.
-