Package net.ssehub.easy.varModel.cst
Class Parenthesis
java.lang.Object
net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
net.ssehub.easy.varModel.cst.Parenthesis
- All Implemented Interfaces:
IAttributeAccess
Represents a parenthesis. The value of a parenthesis is just the
value of the contained expression. This class is used to represent
explicit sub expressions.
- Author:
- Holger Eichelberger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConstraintSyntaxTreeStores the expression in the parenthesis. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for serialization.Creates a new parenthesis node. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IConstraintTreeVisitor visitor) Visiting method for the visitor.booleangetExpr()Returns the nested expression.inthashCode()Infers the datatype of the subtree represented by this object.booleanisSemanticallyEqual(ConstraintSyntaxTree otherTree) Checks whether thisConstraintSyntaxTreeis semantically equal to anotherConstraintSyntaxTree.toString()Methods inherited from class net.ssehub.easy.varModel.cst.ConstraintSyntaxTree
getAttribute, getAttribute, getAttributesCount, getContainedType, getName, getParent
-
Field Details
-
expr
Stores the expression in the parenthesis.
-
-
Constructor Details
-
Parenthesis
Parenthesis()Constructor for serialization. -
Parenthesis
Creates a new parenthesis node.- Parameters:
expr- the nested expression
-
-
Method Details
-
getExpr
Returns the nested expression.- Returns:
- the nested expression
-
inferDatatype
Description copied from class:ConstraintSyntaxTreeInfers the datatype of the subtree represented by this object.- Specified by:
inferDatatypein classConstraintSyntaxTree- Returns:
- the data type
- Throws:
CSTSemanticException- Will be thrown if parameters of (sub-) trees do not fit together.
-
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() -
toString
-
isSemanticallyEqual
Description copied from class:ConstraintSyntaxTreeChecks whether thisConstraintSyntaxTreeis semantically equal to anotherConstraintSyntaxTree. Attention:This method is not fully supported by all operations and sub classes.- Overrides:
isSemanticallyEqualin classConstraintSyntaxTree- Parameters:
otherTree- Another cst to check whether it is semantically equal to this cst.- Returns:
trueif both trees are semantically equal,falseotherwise.
-