javassist.bytecode
public final class FieldInfo extends Object
field_info
structure.
See Also: getFieldInfo
Constructor Summary | |
---|---|
FieldInfo(ConstPool cp, String fieldName, String desc)
Constructs a field_info structure.
|
Method Summary | |
---|---|
void | addAttribute(AttributeInfo info)
Appends an attribute. |
int | getAccessFlags()
Returns the access flags.
|
AttributeInfo | getAttribute(String name)
Returns the attribute with the specified name.
|
List | getAttributes()
Returns all the attributes. |
int | getConstantValue()
Finds a ConstantValue attribute and returns the index into
the constant_pool table.
|
ConstPool | getConstPool()
Returns the constant pool table used
by this field_info . |
String | getDescriptor()
Returns the field descriptor.
|
String | getName()
Returns the field name. |
void | setAccessFlags(int acc)
Sets the access flags.
|
void | setDescriptor(String desc)
Sets the field descriptor.
|
void | setName(String newName)
Sets the field name. |
String | toString()
Returns a string representation of the object. |
field_info
structure.
Parameters: cp a constant pool table fieldName field name desc field descriptor
See Also: Descriptor
See Also: getAttributes
See Also: AccessFlag
Parameters: name attribute name
See Also: getAttributes
List
object
is shared with this object. If you add a new attribute to the list,
the attribute is also added to the field represented by this
object. If you remove an attribute from the list, it is also removed
from the field.
Returns: a list of AttributeInfo
objects.
See Also: AttributeInfo
constant_pool
table.
Returns: 0 if a ConstantValue attribute is not found.
field_info
.See Also: Descriptor
See Also: AccessFlag
See Also: Descriptor