Interface FieldInfo
- All Known Implementing Classes:
Field
public interface FieldInfo
FieldInfo grants access to a field's name and type (represented as indices
into the constant pool), as well as its modifiers. FieldInfo is implemented
in file.Field.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintGet the index into the constant pool of the field's constant value, if any.Get the class which declared the field.intGet the modifiers of the field.intGet the index into the constant pool of the name of the field.voidsetConstantValue(int index) Set the index into the constant pool of the field's constant value.voidsetModifiers(int modifiers) Set the modifiers of the field.voidsetNameIndex(int index) Set the index into the constant pool of the name of the field.voidsetTypeIndex(int index) Set the index into the constant pool of the type of the field.intGet the index into the constant pool of the type of the field.
-
Method Details
-
declaringClass
ClassInfo declaringClass()Get the class which declared the field.- Returns:
- The ClassInfo of the class which declared the field.
-
nameIndex
int nameIndex()Get the index into the constant pool of the name of the field.- Returns:
- The index into the constant pool of the name of the field.
-
typeIndex
int typeIndex()Get the index into the constant pool of the type of the field.- Returns:
- The index into the constant pool of the type of the field.
-
setNameIndex
void setNameIndex(int index) Set the index into the constant pool of the name of the field.- Parameters:
index- The index into the constant pool of the name of the field.
-
setTypeIndex
void setTypeIndex(int index) Set the index into the constant pool of the type of the field.- Parameters:
index- The index into the constant pool of the type of the field.
-
setModifiers
void setModifiers(int modifiers) Set the modifiers of the field. The values correspond to the constants in the Modifiers class.- Parameters:
modifiers- A bit vector of modifier flags for the field.- See Also:
-
modifiers
int modifiers()Get the modifiers of the field. The values correspond to the constants in the Modifiers class.- Returns:
- A bit vector of modifier flags for the field.
- See Also:
-
constantValue
int constantValue()Get the index into the constant pool of the field's constant value, if any. Returns 0 if the field does not have a constant value.- See Also:
-
setConstantValue
void setConstantValue(int index) Set the index into the constant pool of the field's constant value.- See Also:
-