edu.umd.cs.findbugs.ba.constant
public class Constant extends Object
See Also: ConstantAnalysis
| Field Summary | |
|---|---|
| static Constant | NOT_CONSTANT
Single instance representing all non-constant values. |
| Constructor Summary | |
|---|---|
| Constant(Object value)
Constructor for a constant value.
| |
| Method Summary | |
|---|---|
| int | getConstantInt()
Get the constant int value of this value.
|
| String | getConstantString()
Get the constant String value of this value.
|
| 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.
|
Parameters: value the constant value; must be a String, Integer, etc.
Returns: the constant int value
Returns: the constant String value
Returns: true if the value is a constant, false if not
Returns: true if the value is a constant int/Integer, false if not
Returns: true if the value is a constant String, false if not
Parameters: a a Constant b another Constant
Returns: the merge (dataflow meet) of the two Constants