public class FieldInfo extends ClassFileStruct implements IBinaryField, Comparable
| Modifier and Type | Field and Description |
|---|---|
protected int |
accessFlags |
protected int |
attributeBytes |
protected Constant |
constant |
protected char[] |
descriptor |
protected char[] |
name |
protected char[] |
signature |
protected int |
signatureUtf8Offset |
protected long |
tagBits |
protected Object |
wrappedConstantValue |
| Modifier | Constructor and Description |
|---|---|
protected |
FieldInfo(byte[] classFileBytes,
int[] offsets,
int offset) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
static FieldInfo |
createField(byte[] classFileBytes,
int[] offsets,
int offset) |
boolean |
equals(Object o) |
IBinaryAnnotation[] |
getAnnotations()
Answer the runtime visible and invisible annotations for this field or null if none.
|
Constant |
getConstant()
Return the constant of the field.
|
char[] |
getGenericSignature()
Answer the receiver's signature which describes the parameter &
return types as specified in section 4.4.4 of the Java 2 VM spec.
|
int |
getModifiers()
Answer an int whose bits are set according the access constants
defined by the VM spec.
|
char[] |
getName()
Answer the name of the field.
|
long |
getTagBits()
Answer the tagbits set according to the bits for annotations.
|
char[] |
getTypeName()
Answer the resolved name of the receiver's type in the
class file format as specified in section 4.3.2 of the Java 2 VM spec.
|
Object |
getWrappedConstantValue()
Return a wrapper that contains the constant of the field.
|
boolean |
hasConstant()
Return true if the field has a constant value attribute, false otherwise.
|
int |
hashCode() |
protected void |
initialize()
This method is used to fully initialize the contents of the receiver.
|
boolean |
isSynthetic()
Return true if the field is a synthetic field, false otherwise.
|
int |
sizeInBytes()
Answer the size of the receiver in bytes.
|
void |
throwFormatException() |
String |
toString() |
protected void |
toStringContent(StringBuffer buffer) |
protected int accessFlags
protected int attributeBytes
protected Constant constant
protected char[] descriptor
protected char[] name
protected char[] signature
protected int signatureUtf8Offset
protected long tagBits
protected Object wrappedConstantValue
protected FieldInfo(byte[] classFileBytes,
int[] offsets,
int offset)
classFileBytes - byte[]offsets - int[]offset - intpublic static FieldInfo createField(byte[] classFileBytes, int[] offsets, int offset)
public int compareTo(Object o)
compareTo in interface Comparablepublic Constant getConstant()
getConstant in interface IBinaryFieldpublic char[] getGenericSignature()
IBinaryFieldgetGenericSignature in interface IBinaryFieldpublic int getModifiers()
getModifiers in interface IGenericFieldpublic char[] getName()
getName in interface IBinaryFieldpublic long getTagBits()
IBinaryFieldgetTagBits in interface IBinaryFieldpublic char[] getTypeName()
getTypeName in interface IBinaryFieldpublic IBinaryAnnotation[] getAnnotations()
IBinaryFieldgetAnnotations in interface IBinaryFieldpublic Object getWrappedConstantValue()
public boolean hasConstant()
protected void initialize()
public boolean isSynthetic()
public int sizeInBytes()
public void throwFormatException()
throws ClassFormatException
ClassFormatExceptionprotected void toStringContent(StringBuffer buffer)
Copyright © 2013. All rights reserved.