|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--javar.fields.Field
This class represents a field in a class
| Constructor Summary | |
Field(ConstantPool p)
Constructor |
|
| Method Summary | |
int |
getAccessFlags()
This will get the access flags for this field. |
ConstantPoolEntry |
getConstantValue()
If this field is final then it may have a constant value that is associated with it. |
String |
getNameAsString()
This will get the name of this field as a String. |
int |
getType()
This will get the type of this field. |
String |
getTypeAsString()
This will get the type of this field as a String. |
void |
load(DataInputStream in)
This will load the data necessary to have a field |
void |
setAccessFlags(int flags)
This will set the access flags for this field. |
void |
setType(int type)
This will set the type for this field. |
byte[] |
toBytes()
This will convert this field into an array of bytes that go in the bytes of a class file |
String |
toString()
This will print the field |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Field(ConstantPool p)
| Method Detail |
public int getAccessFlags()
public void setAccessFlags(int flags)
flags - The new access flags for this fieldpublic int getType()
public String getTypeAsString()
throws JavarParseException
JavarParseException - If there is an exception while parsing the typepublic String getNameAsString()
public void setType(int type)
public ConstantPoolEntry getConstantValue()
public byte[] toBytes()
throws IOException
IOExceptionpublic void load(DataInputStream in)
in - the input stream to load the data frompublic String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||