|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.RawClass.FieldInfo
public class FieldInfo
Each field is described by a variable-length
field_info
structure.
ClassFile
,
HField
Field Summary | |
---|---|
AccessFlags |
access_flags
Access permissions and properties of the field. |
Attribute[] |
attributes
A field can have any number of attributes associated with it. |
int |
descriptor_index
The value of the descriptor_index item must be a
valid index into the constant_pool table. |
int |
name_index
The value of the name_index item must be a valid
index into the constant_pool table. |
protected ClassFile |
parent
ClassFile in which this field information is found. |
Constructor Summary | |
---|---|
FieldInfo(ClassFile parent,
AccessFlags access_flags,
int name_index,
int descriptor_index,
Attribute[] attributes)
Constructor. |
Method Summary | |
---|---|
ConstantUtf8 |
descriptor_index()
|
String |
descriptor()
|
ConstantUtf8 |
name_index()
|
String |
name()
|
void |
print(PrintWriter pw,
int indent)
Pretty-print this field_info structure. |
void |
read(ClassFile p,
ClassDataInputStream in)
Read a single FieldInfo item from an input class bytecode file. |
void |
write(ClassDataOutputStream out)
Writes a FieldInfo item out to a class bytecode file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ClassFile parent
public AccessFlags access_flags
public int name_index
name_index
item must be a valid
index into the constant_pool
table. The
constant_pool
entry at that index must be a
CONSTANT_Utf8_info
structure which must represent a
valid Java field name stored as a simple (not fully qualified)
name, that is, as a Java identifier.
public int descriptor_index
descriptor_index
item must be a
valid index into the constant_pool
table. The
constant_pool
entry at that index must be a
CONSTANT_Utf8_info
structure which must represent a
valid Java field descriptor.
public Attribute[] attributes
The only attributed defined for the
attributes
table of a field_info
structure by this specification is the
ConstantValue
attribute.
Constructor Detail |
---|
public FieldInfo(ClassFile parent, AccessFlags access_flags, int name_index, int descriptor_index, Attribute[] attributes)
Method Detail |
---|
public void read(ClassFile p, ClassDataInputStream in) throws IOException
IOException
public void write(ClassDataOutputStream out) throws IOException
IOException
public ConstantUtf8 name_index()
public ConstantUtf8 descriptor_index()
public String name()
public String descriptor()
public void print(PrintWriter pw, int indent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |