Class Constant
java.lang.Object
edu.umd.cs.findbugs.ba.constant.Constant
Abstract dataflow value representing a value which may or may not be a
constant.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet the constant int value of this value.Get the constant String value of this value.inthashCode()booleanReturn whether or not this value is a constant.booleanReturn whether or not this value is a constant int/Integer.booleanReturn whether or not this value is a constant String.static ConstantMerge two Constnts.toString()
-
Field Details
-
value
-
NOT_CONSTANT
Single instance representing all non-constant values.
-
-
Constructor Details
-
Constant
Constructor for a constant value.- Parameters:
value- the constant value; must be a String, Integer, etc.
-
-
Method Details
-
getConstantValue
-
isConstant
public boolean isConstant()Return whether or not this value is a constant.- Returns:
- true if the value is a constant, false if not
-
isConstantString
public boolean isConstantString()Return whether or not this value is a constant String.- Returns:
- true if the value is a constant String, false if not
-
getConstantString
Get the constant String value of this value.- Returns:
- the constant String value
-
isConstantInteger
public boolean isConstantInteger()Return whether or not this value is a constant int/Integer.- Returns:
- true if the value is a constant int/Integer, false if not
-
getConstantInt
public int getConstantInt()Get the constant int value of this value.- Returns:
- the constant int value
-
merge
-
equals
-
hashCode
-
toString
-