Class FieldInfo
java.lang.Object
|
+--JavaElement
|
+--FieldInfo
- class FieldInfo
- extends JavaElement
- implements JVM
Constructor Summary |
(package private) |
FieldInfo(Klass cls,
ConstantPool pool,
java.io.DataInput in)
create a FieldInfo from a section of a class file.
|
(package private) |
FieldInfo(Klass cls,
java.lang.String name,
java.lang.String signature)
create a FieldInfo for a 'normal' field.
|
Method Summary |
(package private) int |
computeSize()
compute the byte size of this field. |
(package private) void |
report()
|
(package private) java.lang.String |
shortLabel()
the short label of this static field. |
java.lang.String |
toString()
field name, prefixed by class |
(package private) void |
updateNeeded()
update the 'needed' state of this field and all related elements.
|
(package private) void |
write(java.io.DataOutput out)
write this field to a classfile. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
access_flags
int access_flags
attributes
AttributeTable attributes
pool
ConstantPool pool
cls
Klass cls
name
java.lang.String name
signature
java.lang.String signature
inStaticInitializer
boolean inStaticInitializer
fieldIndex
int fieldIndex
- the (globally unique) index of this needed static field.
Unneeded or instance fields have -1.
offset
int offset
- offset of this field in the instance's layout.
size
int size
- byte size of this field.
FieldInfo
FieldInfo(Klass cls,
java.lang.String name,
java.lang.String signature)
- create a FieldInfo for a 'normal' field.
It's a non-static field with default access.
- Parameters:
cls
- description of the defining classname
- name of fieldsignature
- the field's type signature
FieldInfo
FieldInfo(Klass cls,
ConstantPool pool,
java.io.DataInput in)
throws java.io.IOException
- create a FieldInfo from a section of a class file.
The FieldInfo is filled by reading from a stream.
On entry, the stream is positioned to the beginning
of the field_info structure. The method leaves the
stream positioned immediately after the end of
this structure.
- Parameters:
cls
- description of the defining classpool
- the constant pool - already read from the class filein
- the stream to read exactly 1 field_info structure from
computeSize
int computeSize()
- compute the byte size of this field.
write
void write(java.io.DataOutput out)
throws java.io.IOException
- write this field to a classfile.
updateNeeded
void updateNeeded()
- update the 'needed' state of this field and all related elements.
If non-static field is needed, its class is needed, too.
We also need the class for the field's declared type.
- Overrides:
- updateNeeded in class JavaElement
shortLabel
java.lang.String shortLabel()
- the short label of this static field.
toString
public java.lang.String toString()
- field name, prefixed by class
- Overrides:
- toString in class java.lang.Object
report
void report()