Modifier and Type | Method and Description |
---|---|
void |
addAttribute(Attribute attr) |
Annotation |
addRuntimeInvisibleAnnotation(TypeDesc type)
Add a runtime invisible annotation.
|
Annotation |
addRuntimeVisibleAnnotation(TypeDesc type)
Add a runtime visible annotation.
|
Attribute[] |
getAttributes() |
ClassFile |
getClassFile()
Returns the parent ClassFile for this FieldInfo.
|
ConstantInfo |
getConstantValue()
Returns the constant value for this field or null if no constant set.
|
ConstantUTFInfo |
getDescriptorConstant()
Returns a constant from the constant pool with this field's type
descriptor string.
|
int |
getLength()
Returns the length (in bytes) of this object in the class file.
|
Modifiers |
getModifiers()
Returns this field's modifiers.
|
String |
getName()
Returns the name of this field.
|
ConstantUTFInfo |
getNameConstant()
Returns a constant from the constant pool with this field's name.
|
Annotation[] |
getRuntimeInvisibleAnnotations()
Returns all the runtime invisible annotations defined for this class
file, or an empty array if none.
|
Annotation[] |
getRuntimeVisibleAnnotations()
Returns all the runtime visible annotations defined for this class file,
or an empty array if none.
|
SignatureAttr |
getSignatureAttr()
Returns the signature attribute of this field, or null if none is
defined.
|
TypeDesc |
getType()
Returns the type of this field.
|
boolean |
isDeprecated() |
boolean |
isSynthetic() |
void |
markDeprecated()
Mark this field as being deprecated by adding a special attribute.
|
void |
markSynthetic()
Mark this field as being synthetic by adding a special attribute.
|
void |
setConstantValue(double value)
Set the constant value for this field as a double.
|
void |
setConstantValue(float value)
Set the constant value for this field as a float.
|
void |
setConstantValue(int value)
Set the constant value for this field as an int.
|
void |
setConstantValue(long value)
Set the constant value for this field as a long.
|
void |
setConstantValue(String value)
Set the constant value for this field as a string.
|
void |
setModifiers(Modifiers modifiers) |
String |
toString() |
void |
writeTo(DataOutput dout) |
public ClassFile getClassFile()
public String getName()
public TypeDesc getType()
public Modifiers getModifiers()
public void setModifiers(Modifiers modifiers)
public ConstantUTFInfo getNameConstant()
public ConstantUTFInfo getDescriptorConstant()
TypeDesc
public ConstantInfo getConstantValue()
public boolean isSynthetic()
public boolean isDeprecated()
public Annotation[] getRuntimeInvisibleAnnotations()
public Annotation[] getRuntimeVisibleAnnotations()
public Annotation addRuntimeInvisibleAnnotation(TypeDesc type)
public Annotation addRuntimeVisibleAnnotation(TypeDesc type)
public SignatureAttr getSignatureAttr()
public void setConstantValue(int value)
public void setConstantValue(float value)
public void setConstantValue(long value)
public void setConstantValue(double value)
public void setConstantValue(String value)
public void markSynthetic()
public void markDeprecated()
public void addAttribute(Attribute attr)
public Attribute[] getAttributes()
public int getLength()
public void writeTo(DataOutput dout) throws IOException
IOException
Copyright © 2004-2015 Cojen. All Rights Reserved.