public class FieldGen extends FieldGenOrMethodGen
FieldannotationList, cp, name, type| Constructor and Description |
|---|
FieldGen(Field field,
ConstantPool cp)
Instantiate from existing field.
|
FieldGen(int modifiers,
Type type,
java.lang.String name,
ConstantPool cpool)
Declare a field.
|
| Modifier and Type | Method and Description |
|---|---|
Field |
getField()
Get field object after having set up all necessary values.
|
java.lang.String |
getInitialValue() |
java.lang.String |
getSignature() |
void |
setInitialStringValue(java.lang.String value) |
void |
setValue(int index) |
void |
setValue(java.lang.String constantString) |
java.lang.String |
toString()
Return string representation close to declaration format, `public static final short MAX = 100', e.g..
|
void |
wipeValue() |
addAnnotation, addAnnotationsAsAttribute, addAttribute, getAnnotations, getAttributes, getAttributesImmutable, getConstantPool, getName, getType, removeAnnotation, removeAnnotations, removeAttribute, removeAttributes, setConstantPool, setName, setTypegetModifiers, isAbstract, isBridge, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVarargs, isVolatile, setModifierspublic FieldGen(int modifiers,
Type type,
java.lang.String name,
ConstantPool cpool)
modifiers - access qualifierstype - field typename - field namecpool - constant poolpublic FieldGen(Field field, ConstantPool cp)
field - Field objectcp - constant pool (must contain the same entries as the field's constant pool)public void setValue(int index)
public void setValue(java.lang.String constantString)
public void wipeValue()
public Field getField()
public java.lang.String getSignature()
getSignature in class FieldGenOrMethodGenpublic java.lang.String getInitialValue()
public void setInitialStringValue(java.lang.String value)
public final java.lang.String toString()
toString in class java.lang.Object