Package gnu.jel
Class LocalField
java.lang.Object
gnu.jel.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
- 
Constructor SummaryConstructors Constructor Description LocalField(int modifiers, java.lang.Class<?> type, java.lang.String name, java.lang.Object constValue)Constructs a new local field.
- 
Method SummaryModifier and Type Method Description java.lang.ObjectgetConstValue()Returns a value of the public static final field.java.lang.Class<?>getDeclaringClass()intgetModifiers()java.lang.StringgetName()java.lang.Class<?>getType()booleanisSynthetic()
- 
Constructor Details- 
LocalFieldpublic 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 Details- 
getDeclaringClasspublic java.lang.Class<?> getDeclaringClass()- Specified by:
- getDeclaringClassin interface- java.lang.reflect.Member
 
- 
getNamepublic java.lang.String getName()- Specified by:
- getNamein interface- java.lang.reflect.Member
 
- 
getModifierspublic int getModifiers()- Specified by:
- getModifiersin interface- java.lang.reflect.Member
 
- 
getTypepublic java.lang.Class<?> getType()
- 
isSyntheticpublic boolean isSynthetic()- Specified by:
- isSyntheticin interface- java.lang.reflect.Member
 
- 
getConstValuepublic 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.
 
 
-