|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectserp.bytecode.Attributes
serp.bytecode.Attribute
serp.bytecode.ConstantValue
public class ConstantValue
A constant value for a member field.
Method Summary | |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
double |
getDoubleValue()
Get the value of this double constant. |
BCField |
getField()
Return the owning field. |
float |
getFloatValue()
Get the value of this float constant. |
int |
getIntValue()
Get the value of this int constant, or 0 if not set. |
long |
getLongValue()
Get the value of this long constant. |
String |
getStringValue()
Get the value of this string constant. |
Class |
getType()
Return the type of constant this attribute represents (String.class, int.class, etc), or null if not set. |
BCClass |
getTypeBC()
Return the bytecode for the type of constant this attribute represents. |
String |
getTypeName()
Return the type of constant this attribute represents, or null if not set. |
Object |
getValue()
Return the value of this constant as an Object of the appropriate type (String, Integer, Double, etc), or null if not set. |
int |
getValueIndex()
Return the ConstantPool index of the ConstantEntry
holding the value of this constant. |
void |
setDoubleValue(double value)
Set the value of this double constant. |
void |
setFloatValue(float value)
Set the value of this float constant. |
void |
setIntValue(int value)
Set the value of this int constant. |
void |
setLongValue(long value)
Set the value of this long constant. |
void |
setStringValue(String value)
Set the value of this string constant. |
void |
setValue(Object value)
Set the value of this constant using the appropriate wrapper Object type (String, Integer, Double, etc). |
void |
setValueIndex(int valueIndex)
Set the ConstantPool of the ConstantEntry
holding the value of this constant. |
Methods inherited from class serp.bytecode.Attribute |
---|
getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, isValid |
Methods inherited from class serp.bytecode.Attributes |
---|
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public BCField getField()
public int getValueIndex()
ConstantPool
index of the ConstantEntry
holding the value of this constant. Defaults to 0.
public void setValueIndex(int valueIndex)
ConstantPool
of the ConstantEntry
holding the value of this constant.
public String getTypeName()
public Class getType()
public BCClass getTypeBC()
public Object getValue()
public void setValue(Object value)
public int getIntValue()
public void setIntValue(int value)
public float getFloatValue()
public void setFloatValue(float value)
public double getDoubleValue()
public void setDoubleValue(double value)
public long getLongValue()
public void setLongValue(long value)
public String getStringValue()
public void setStringValue(String value)
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |