public abstract class FieldInfo extends InfoObject implements GenericSignatureHolder
Modifier and Type | Field and Description |
---|---|
protected int |
attributes |
protected ClassInfo |
ci |
protected Object |
cv |
protected int |
fieldIndex |
protected String |
genericSignature |
protected int |
modifiers |
protected String |
name |
protected String |
signature |
protected int |
storageOffset |
protected int |
storageSize |
protected String |
type |
annotations, attr
Modifier | Constructor and Description |
---|---|
protected |
FieldInfo(String name,
String signature,
int modifiers) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(int a) |
boolean |
breakShared() |
static FieldInfo |
create(String name,
String signature,
int modifiers) |
int |
getAttributes() |
Class<? extends ChoiceGenerator<?>> |
getChoiceGeneratorType() |
ClassInfo |
getClassInfo()
Returns the class that this field is associated with.
|
Object |
getConstantValue() |
int |
getFieldIndex() |
String |
getFullName() |
String |
getGenericSignature() |
FieldInfo |
getInstanceFor(ClassInfo ci)
Creates a field for a given class, by cloning this FieldInfo
and reseting the class that the field belongs to
|
int |
getModifiers() |
String |
getName()
Returns the name of the field.
|
String |
getSignature() |
int |
getStorageOffset() |
int |
getStorageSize() |
String |
getType()
Returns the type of the field as a fully qualified type name according to JLS 6.7
("int", "x.Y[]")
|
ClassInfo |
getTypeClassInfo() |
byte |
getTypeCode() |
abstract Object |
getValueObject(Fields data) |
abstract void |
initialize(ElementInfo ei,
ThreadInfo ti)
pushClinit the corresponding data in the provided Fields instance
|
boolean |
is1SlotField() |
boolean |
is2SlotField() |
boolean |
isArrayField() |
boolean |
isBooleanField() |
boolean |
isByteField() |
boolean |
isCharField() |
boolean |
isDoubleField() |
boolean |
isFinal()
is this field declared `final'?
|
boolean |
isFloatField() |
boolean |
isFloatingPointField() |
boolean |
isIntField() |
boolean |
isLongField() |
boolean |
isNumericField() |
boolean |
isPublic() |
boolean |
isReference() |
boolean |
isShortField() |
boolean |
isStatic()
is this a static field? Counter productive to the current class struct,
but at some point we want to get rid of the Dynamic/Static branch (it's
really just a field attribute)
|
boolean |
isTransient() |
boolean |
isVolatile() |
protected void |
linkToClass(ClassInfo ci,
int idx,
int off) |
boolean |
neverBreak() |
void |
setConstantValue(Object constValue) |
void |
setGenericSignature(String sig) |
String |
toString()
Returns a string representation of the field.
|
abstract String |
valueToString(Fields f) |
addAnnotation, addAttr, attrIterator, attrIterator, getAnnotation, getAnnotations, getAttr, getAttr, getDeclaredAnnotations, getNextAttr, hasAnnotations, hasAttr, hasAttr, hasAttrValue, removeAttr, replaceAttr, setAnnotations, setAttr
protected int attributes
protected final String name
protected String type
protected final String signature
protected int storageSize
protected ClassInfo ci
protected int fieldIndex
protected int storageOffset
protected Object cv
protected String genericSignature
protected int modifiers
protected void linkToClass(ClassInfo ci, int idx, int off)
public void setConstantValue(Object constValue)
public boolean is1SlotField()
public boolean is2SlotField()
public boolean isBooleanField()
public boolean isByteField()
public boolean isCharField()
public boolean isShortField()
public boolean isIntField()
public boolean isLongField()
public boolean isFloatField()
public boolean isDoubleField()
public boolean isNumericField()
public boolean isFloatingPointField()
public boolean isReference()
public boolean isArrayField()
public ClassInfo getClassInfo()
public Object getConstantValue()
public int getModifiers()
public int getFieldIndex()
public boolean isStatic()
public boolean isFinal()
public boolean isVolatile()
public boolean isTransient()
public boolean isPublic()
public String getName()
public int getStorageSize()
public String getType()
public byte getTypeCode()
public String getSignature()
public String getGenericSignature()
getGenericSignature
in interface GenericSignatureHolder
public void setGenericSignature(String sig)
setGenericSignature
in interface GenericSignatureHolder
public ClassInfo getTypeClassInfo()
public Class<? extends ChoiceGenerator<?>> getChoiceGeneratorType()
public abstract void initialize(ElementInfo ei, ThreadInfo ti)
public String toString()
public void addAttribute(int a)
public int getAttributes()
public boolean breakShared()
public boolean neverBreak()
public int getStorageOffset()
public String getFullName()