Package net.ssehub.easy.varModel.cst
Class CSTUtils
- java.lang.Object
-
- net.ssehub.easy.varModel.cst.CSTUtils
-
public class CSTUtils extends java.lang.ObjectUtility functions for handlingConstraintSyntaxTrees.- Author:
- El-Sharkawy
-
-
Constructor Summary
Constructors Modifier Constructor Description privateCSTUtils()Avoid initialization.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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).
-
-
-
Method Detail
-
isAssignment
public static boolean isAssignment(ConstraintSyntaxTree completeCST)
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:
- true if the given constraint is an assignment, false if it is a constraint.
-
isSimpleAssignment
public static boolean isSimpleAssignment(ConstraintSyntaxTree completeCST)
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:
- true if the given constraint is a simple assignment, false if it is a complex constraint.
-
-