Package net.ssehub.easy.varModel.cst
Class CSTUtils
java.lang.Object
net.ssehub.easy.varModel.cst.CSTUtils
Utility functions for handling
ConstraintSyntaxTrees.- Author:
- El-Sharkawy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAssignment(ConstraintSyntaxTree completeCST) Checks whether the givenConstraintSyntaxTreeis a assignment or a constraint.static booleanisSimpleAssignment(ConstraintSyntaxTree completeCST) Checks whether the givenConstraintSyntaxTreeis a simple assignment (variable assigned with constant or compound/container initializer).
-
Constructor Details
-
CSTUtils
private CSTUtils()Avoid initialization.
-
-
Method Details
-
isAssignment
Checks whether the givenConstraintSyntaxTreeis a assignment or a constraint. Assignments are always instance ofOCLFeatureCall.- Parameters:
completeCST- A complete (not sub part) constraint, must not be null.- Returns:
trueif the given constraint is an assignment,falseif it is a constraint.
-
isSimpleAssignment
Checks whether the givenConstraintSyntaxTreeis a simple assignment (variable assigned with constant or compound/container initializer).- Parameters:
completeCST- A complete (not sub part) constraint, must not be null.- Returns:
trueif the given constraint is a simple assignment,falseif it is a complex constraint.
-