Field
| Modifier and Type | Field and Description |
|---|---|
| private static BCELComparator | |
| private List | |
| private Object |
| Access | Constructor and Description |
|---|---|
| public | FieldGen(final Field
Field object. field, final ConstantPoolGen constant pool (must contain the same entries as the field's constant pool). cp)Instantiate from existing field. |
| public | FieldGen(final int
access qualifiers accessFlags, final Type field type type, final String field name name, final ConstantPoolGen constant pool cp)Declare a field. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private int | |
| public void | |
| public void | |
| private void | |
| public FieldGen | |
| public boolean | equals(final Object obj)
Overrides java. Return value as defined by given BCELComparator strategy. |
| public static BCELComparator | |
| public Field | |
| public String | |
| public String | getSignature()
Implements abstract com.
|
| public int | hashCode()
Overrides java. Return value as defined by given BCELComparator strategy. |
| public void | |
| public static void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setInitValue(final String str)
Sets (optional) initial value of field, otherwise it will be set to null/0/false by the JVM automatically. |
| private void | |
| public final String | Returns: String representation of fieldOverrides java. Return string representation close to declaration format, 'public static final short MAX = 100', e.g.. |
| public void |
| bcelComparator | back to summary |
|---|---|
| private static BCELComparator<FieldGen> bcelComparator | |
| observers | back to summary |
|---|---|
| private List<FieldObserver> observers | |
| value | back to summary |
|---|---|
| private Object value | |
| FieldGen | back to summary |
|---|---|
| public FieldGen(final Field field, final ConstantPoolGen cp) Instantiate from existing field.
| |
| FieldGen | back to summary |
|---|---|
| public FieldGen(final int accessFlags, final Type type, final String name, final ConstantPoolGen cp) Declare a field. If it is static (isStatic() == true) and has a basic type like int or String it may have an initial value associated with it as defined by setInitValue().
| |
| addAnnotationsAsAttribute | back to summary |
|---|---|
| private void addAnnotationsAsAttribute(final ConstantPoolGen cp) | |
| addConstant | back to summary |
|---|---|
| private int addConstant() | |
| addObserver | back to summary |
|---|---|
| public void addObserver(final FieldObserver o) Add observer for this object. | |
| cancelInitValue | back to summary |
|---|---|
| public void cancelInitValue() Remove any initial value. | |
| checkType | back to summary |
|---|---|
| private void checkType(final Type atype) | |
| copy | back to summary |
|---|---|
public FieldGen copy(final ConstantPoolGen cp)
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Return value as defined by given BCELComparator strategy. By default two FieldGen objects are said to be equal when their names and signatures are equal.
| |
| getComparator | back to summary |
|---|---|
public static BCELComparator
| |
| getField | back to summary |
|---|---|
| public Field getField() Gets field object after having set up all necessary values. | |
| getInitValue | back to summary |
|---|---|
| public String getInitValue() | |
| getSignature | back to summary |
|---|---|
| public String getSignature() Implements abstract com.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Return value as defined by given BCELComparator strategy. By default return the hash code of the field's name XOR signature.
| |
| removeObserver | back to summary |
|---|---|
| public void removeObserver(final FieldObserver o) Remove observer for this object. | |
| setComparator | back to summary |
|---|---|
public static void setComparator(final BCELComparator<FieldGen> comparator)
| |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final boolean b) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final byte b) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final char c) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final double d) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final float f) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final int i) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final long l) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final short s) | |
| setInitValue | back to summary |
|---|---|
| public void setInitValue(final String str) Sets (optional) initial value of field, otherwise it will be set to null/0/false by the JVM automatically. | |
| setValue | back to summary |
|---|---|
| private void setValue(final int index) | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Return string representation close to declaration format, 'public static final short MAX = 100', e.g.. | |
| update | back to summary |
|---|---|
| public void update() Call notify() method on all observers. This method is not called automatically whenever the state has changed, but has to be called by the user after they have finished editing the object. | |