public final class FieldInfo extends MemberInfo
| Constructor and Description |
|---|
FieldInfo(ConstPool cp,
String fieldName,
String desc)
Constructs a
field_info structure. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(AttributeInfo info)
Appends an attribute.
|
int |
getAccessFlags()
Returns the access flags.
|
Annotation[] |
getAnnotations() |
AttributeInfo |
getAttribute(String name)
Returns the attribute with the specified name.
|
List<AttributeInfo> |
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.
|
String |
getSignature() |
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.
|
equals, getAnnotation, hasAnnotation, hashCodepublic FieldInfo(ConstPool cp, String fieldName, String desc)
field_info structure.cp - a constant pool tablefieldName - field namedesc - field descriptorDescriptorpublic String toString()
public String getSignature()
getSignature in class MemberInfopublic ConstPool getConstPool()
field_info.public String getName()
public void setName(String newName)
public int getAccessFlags()
AccessFlagpublic void setAccessFlags(int acc)
AccessFlagpublic String getDescriptor()
Descriptorpublic void setDescriptor(String desc)
Descriptorpublic int getConstantValue()
constant_pool table.public List<AttributeInfo> 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.getAttributes in class MemberInfoAttributeInfo objects.AttributeInfopublic AttributeInfo getAttribute(String name)
getAttribute in class MemberInfoname - attribute nameAttributeInfo object or null.getAttributes()public void addAttribute(AttributeInfo info)
getAttributes()public Annotation[] getAnnotations()
getAnnotations in interface AnnotatedgetAnnotations in class MemberInfoCopyright © December 07, 2012–2015 The Internet Party. All rights reserved.