Class Constant
java.lang.Object
org.checkerframework.dataflow.constantpropagation.Constant
- All Implemented Interfaces:
AbstractValue<Constant>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Constant.TypeWhat kind of abstract value is this?The value of this abstract value (or null). -
Constructor Summary
ConstructorsConstructorDescriptionCreate a constant forvalue.Constant(Constant.Type type) Create a constant fortype. -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleangetValue()Returns the value.inthashCode()booleanisBottom()Returns true if the constant is BOTTOM.booleanReturns true if the constant is CONSTANT.booleanisTop()Returns true if the constant is TOP.leastUpperBound(Constant other) Compute the least upper bound of two values.toString()
-
Field Details
-
type
What kind of abstract value is this? -
value
The value of this abstract value (or null).
-
-
Constructor Details
-
Constant
Create a constant fortype. -
Constant
Create a constant forvalue.
-
-
Method Details
-
isTop
public boolean isTop()Returns true if the constant is TOP.- Returns:
- true if the constant is TOP
-
isBottom
public boolean isBottom()Returns true if the constant is BOTTOM.- Returns:
- true if the constant is BOTTOM
-
isConstant
Returns true if the constant is CONSTANT.- Returns:
- true if the constant is CONSTANT
-
getValue
Returns the value.- Returns:
- the value
-
copy
-
leastUpperBound
Description copied from interface:AbstractValueCompute the least upper bound of two values.Important: This method must fulfill the following contract:
- Does not change
this. - Does not change
other. - Returns a fresh object which is not aliased yet.
- Returns an object of the same (dynamic) type as
this, even if the signature is more permissive. - Is commutative.
- Specified by:
leastUpperBoundin interfaceAbstractValue<Constant>- Parameters:
other- the other value- Returns:
- the least upper bound of the two values
- Does not change
-
equals
-
hashCode
public int hashCode() -
toString
-