public interface VarInstance extends Declaration
VarInstance
contains type information for a variable. It may
be either a local or a field.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
constantValue()
The variable's constant value, or null.
|
boolean |
constantValueSet()
Whether the variable's constant value has been set yet.
|
Flags |
flags()
The flags of the variable.
|
boolean |
isConstant()
Whether the variable has a constant value.
|
java.lang.String |
name()
The name of the variable.
|
void |
setConstantValue(java.lang.Object value)
Destructively set the constant value of the field.
|
void |
setFlags(Flags flags)
Destructively set the flags of the variable.
|
void |
setName(java.lang.String name)
Set the name of the variable.
|
void |
setNotConstant()
Mark the variable as not a compile time constant.
|
void |
setType(Type type)
Destructively set the type of the variable.
|
Type |
type()
The type of the variable.
|
declaration, setDeclaration
equalsImpl, isCanonical, position, typeSystem
Flags flags()
java.lang.String name()
void setName(java.lang.String name)
name
- The name to set.Type type()
boolean constantValueSet()
java.lang.Object constantValue()
void setConstantValue(java.lang.Object value)
value
- the constant value. Should be an instance of String,
Boolean, Byte, Short, Character, Integer, Long, Float, Double, or null.void setNotConstant()
boolean isConstant()
void setType(Type type)
void setFlags(Flags flags)