public final class Field extends FieldOrMethod
| Modifier and Type | Field and Description |
|---|---|
static Field[] |
EMPTY_ARRAY
Empty array constant.
|
attributes, attributes_count, constant_pool, name_index, signature_indexaccess_flags| Constructor and Description |
|---|
Field(Field c)
Initialize from another object.
|
Field(int accessFlags,
int nameIndex,
int signatureIndex,
Attribute[] attributes,
ConstantPool constantPool) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.
|
Field |
copy(ConstantPool constantPool) |
boolean |
equals(Object obj)
Return value as defined by given BCELComparator strategy.
|
static BCELComparator<Field> |
getComparator() |
ConstantValue |
getConstantValue() |
Type |
getType()
See https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.2.2
|
int |
hashCode()
Return value as defined by given BCELComparator strategy.
|
static void |
setComparator(BCELComparator<Field> comparator) |
String |
toString()
Return string representation close to declaration format, 'public static final short MAX = 100', e.g..
|
copy_, dump, getAnnotationEntries, getAttribute, getAttributes, getConstantPool, getGenericSignature, getName, getNameIndex, getSignature, getSignatureIndex, setAttributes, setConstantPool, setNameIndex, setSignatureIndexgetAccessFlags, getModifiers, isAbstract, isAbstract, isAnnotation, isAnnotation, isEnum, isEnum, isFinal, isFinal, isInterface, isInterface, isNative, isNative, isPrivate, isPrivate, isProtected, isProtected, isPublic, isPublic, isStatic, isStatic, isStrictfp, isStrictfp, isSynchronized, isSynchronized, isSynthetic, isSynthetic, isTransient, isTransient, isVarArgs, isVarArgs, isVolatile, isVolatile, setAccessFlags, setModifierspublic static final Field[] EMPTY_ARRAY
public Field(Field c)
c - Source to copy.public Field(int accessFlags,
int nameIndex,
int signatureIndex,
Attribute[] attributes,
ConstantPool constantPool)
accessFlags - Access rights of fieldnameIndex - Points to field name in constant poolsignatureIndex - Points to encoded signatureattributes - Collection of attributesconstantPool - Array of constantspublic static BCELComparator<Field> getComparator()
public static void setComparator(BCELComparator<Field> comparator)
comparator - Comparison strategy object.public void accept(Visitor v)
v - Visitor objectpublic Field copy(ConstantPool constantPool)
public boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public ConstantValue getConstantValue()
public Type getType()
public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2004–2025 The Apache Software Foundation. All rights reserved.