gnu.bytecode

Class Field

public class Field extends Location implements AttrContainer, Member

Constructor Summary
Field(ClassType ctype)
Add a new Field to a ClassType.
Method Summary
AttributegetAttributes()
ClassTypegetDeclaringClass()
intgetFlags()
intgetModifiers()
FieldgetNext()
FieldgetReflectField()
StringgetSourceName()
booleangetStaticFlag()
static FieldsearchField(Field fields, String name)
Find a field with the given name.
voidsetAttributes(Attribute attributes)
voidsetConstantValue(Object value, ClassType ctype)
Set the ConstantValue attribute for this field.
voidsetSourceName(String name)
voidsetStaticFlag(boolean is_static)
StringtoString()

Constructor Detail

Field

public Field(ClassType ctype)
Add a new Field to a ClassType.

Method Detail

getAttributes

public final Attribute getAttributes()

getDeclaringClass

public final ClassType getDeclaringClass()

getFlags

public final int getFlags()

getModifiers

public final int getModifiers()

getNext

public final Field getNext()

getReflectField

public Field getReflectField()

getSourceName

public String getSourceName()

getStaticFlag

public final boolean getStaticFlag()

searchField

public static Field searchField(Field fields, String name)
Find a field with the given name.

Parameters: fields list of fields to search name (interned source) name of field to look for

setAttributes

public final void setAttributes(Attribute attributes)

setConstantValue

public final void setConstantValue(Object value, ClassType ctype)
Set the ConstantValue attribute for this field.

Parameters: value the value to use for the ConstantValue attribute of this field ctype the class that contains this field This field's type is used to determine the kind of constant.

setSourceName

public void setSourceName(String name)

setStaticFlag

public final void setStaticFlag(boolean is_static)

toString

public String toString()