Package net.ssehub.easy.varModel.cst
Class ConstantValue
java.lang.Object
net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
net.ssehub.easy.varModel.cst.Leaf
net.ssehub.easy.varModel.cst.ConstantValue
- All Implemented Interfaces:
IAttributeAccess
Class for a constant value.
- Author:
- jaehne, Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for serialization.ConstantValue(Value constant) Sole constructor for the creation of a constant value. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IConstraintTreeVisitor visitor) Visiting method for the visitor.booleanGetter-Method for the constant-value.Returns the data type explicitly contained in this syntax tree.inthashCode()Infers the datatype of the subtree represented by this object.static final booleanReturns whether the given constraint is exactly the IVML null value.toString()Methods inherited from class net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
getAttribute, getAttribute, getAttributesCount, getName, getParent, isSemanticallyEqual
-
Field Details
-
constant
-
-
Constructor Details
-
ConstantValue
ConstantValue()Constructor for serialization. -
ConstantValue
Sole constructor for the creation of a constant value.- Parameters:
constant- Constant value to be stored.
-
-
Method Details
-
inferDatatype
Description copied from class:ConstraintSyntaxTreeInfers the datatype of the subtree represented by this object.- Specified by:
inferDatatypein classConstraintSyntaxTree- Returns:
- the data type
-
getConstantValue
Getter-Method for the constant-value.- Returns:
- the value of the constant-attribute.
-
accept
Description copied from class:ConstraintSyntaxTreeVisiting method for the visitor.
This method is used for saving this model element.- Specified by:
acceptin classConstraintSyntaxTree- Parameters:
visitor- The visitor, which should save this model element.
-
equals
-
hashCode
public int hashCode() -
getContainedType
Description copied from class:ConstraintSyntaxTreeReturns the data type explicitly contained in this syntax tree. This is typically a constant value which contains a meta value, i.e. a type expression.- Overrides:
getContainedTypein classConstraintSyntaxTree- Returns:
- the contained type or null if there is none
-
toString
-
isNull
Returns whether the given constraint is exactly the IVML null value.- Parameters:
cst- the constraint syntax tree- Returns:
trueifcstis null,falseelse
-