Class CSTUtils


  • public class CSTUtils
    extends java.lang.Object
    Utility functions for handling ConstraintSyntaxTrees.
    Author:
    El-Sharkawy
    • Constructor Detail

      • CSTUtils

        private CSTUtils()
        Avoid initialization.
    • Method Detail

      • isAssignment

        public static boolean isAssignment​(ConstraintSyntaxTree completeCST)
        Checks whether the given ConstraintSyntaxTree is a assignment or a constraint. Assignments are always instance of OCLFeatureCall.
        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 given ConstraintSyntaxTree is 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.