public class Constant extends Object
ConstantAnalysis| Modifier and Type | Field and Description |
|---|---|
static Constant |
NOT_CONSTANT
Single instance representing all non-constant values.
|
| Constructor and Description |
|---|
Constant(Object value)
Constructor for a constant value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getConstantInt()
Get the constant int value of this value.
|
String |
getConstantString()
Get the constant String value of this value.
|
Object |
getConstantValue() |
int |
hashCode() |
boolean |
isConstant()
Return whether or not this value is a constant.
|
boolean |
isConstantInteger()
Return whether or not this value is a constant int/Integer.
|
boolean |
isConstantString()
Return whether or not this value is a constant String.
|
static Constant |
merge(Constant a,
Constant b)
Merge two Constants.
|
String |
toString() |
public static final Constant NOT_CONSTANT
public Object getConstantValue()
public boolean isConstant()
public boolean isConstantString()
public String getConstantString()
public boolean isConstantInteger()
public int getConstantInt()
public static Constant merge(Constant a, Constant b)
a - a StaticConstantb - another StaticConstantCopyright © 2003–2015. All rights reserved.