| java.lang.Object EDU.purdue.cs.bloat.file.Field
Method Summary | |
public int | constantValue() Get the index into the constant pool of the field's constant value, if
any. | public ClassInfo | declaringClass() Get the class which declared the field. | public int | modifiers() Get the modifiers of the field. | public int | nameIndex() Get the index into the constant pool of the name of the field. | public void | setConstantValue(int index) Set the index into the constant pool of the field's constant value. | public void | setModifiers(int modifiers) Set the modifiers of the field. | public void | setNameIndex(int name) Set the index into the constant pool of the name of the field. | public void | setTypeIndex(int type) Set the index into the constant pool of the type of the field. | public String | toString() Convert the field to a string. | public int | typeIndex() Get the index into the constant pool of the type of the field. | public void | write(DataOutputStream out) Write the field to a class file. |
Field | Field(ClassInfo classInfo, int modifiers, int typeIndex, int nameIndex)(Code) | | Constructor for creating a new field from scratch
|
Field | Field(ClassInfo classInfo, int modifiers, int typeIndex, int nameIndex, int cvNameIndex, int constantValueIndex)(Code) | | Constructor for creating a new field that has a constant value from
scratch
|
Field | public Field(DataInputStream in, ClassInfo classInfo) throws IOException(Code) | | Constructor. Read a field from a class file.
Parameters: in - The data stream of the class file. Parameters: classInfo - The class file containing the field. exception: IOException - If an error occurs while reading. |
constantValue | public int constantValue()(Code) | | 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: ClassInfo.constants |
declaringClass | public ClassInfo declaringClass()(Code) | | Get the class which declared the field.
The ClassInfo of the class which declared the field. |
modifiers | public int modifiers()(Code) | | Get the modifiers of the field. The values correspond to the constants in
the Modifiers class.
A bit vector of modifier flags for the field. See Also: Modifiers |
nameIndex | public int nameIndex()(Code) | | Get the index into the constant pool of the name of the field.
The index into the constant pool of the name of the field. |
setConstantValue | public void setConstantValue(int index)(Code) | | Set the index into the constant pool of the field's constant value.
See Also: ClassInfo.constants |
setModifiers | public void setModifiers(int modifiers)(Code) | | 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 |
setNameIndex | public void setNameIndex(int name)(Code) | | Set the index into the constant pool of the name of the field.
Parameters: name - The name of the field. |
setTypeIndex | public void setTypeIndex(int type)(Code) | | Set the index into the constant pool of the type of the field.
Parameters: type - The type of the field. |
toString | public String toString()(Code) | | Convert the field to a string.
A string representation of the field. |
typeIndex | public int typeIndex()(Code) | | Get the index into the constant pool of the type of the field.
The index into the constant pool of the type of the field. |
|
|