Class ConstraintFunctions


  • public class ConstraintFunctions
    extends java.lang.Object
    Generic constraint functions based on the AbstractConstraintProcessor.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • ConstraintFunctions

        public ConstraintFunctions()
    • Method Detail

      • allCompoundConstraints

        public static void allCompoundConstraints​(Compound cmpType,
                                                  AbstractConstraintProcessor processor,
                                                  boolean includeConstraintVariables,
                                                  boolean includeDefaults,
                                                  IModelElement parent)
        Processes all constraints relevant to the given Compound.
        Parameters:
        cmpType - Compound to be processed.
        processor - The constraint processor functor.
        includeConstraintVariables - true whether constraint variables shall be included.
        includeDefaults - true whether default value expressions shall be included.
        parent - the intended parent for constraints, typically the containing project
      • allAssignmentConstraints

        public static void allAssignmentConstraints​(AttributeAssignment assng,
                                                    AbstractConstraintProcessor processor)
        Processes all assignment constraints.
        Parameters:
        assng - the assignment constraint
        processor - the constraint processor for assignment constraints
      • addConstraintsToProject

        public static void addConstraintsToProject​(AbstractVariable var,
                                                   Project scope,
                                                   Project target)
        Adds constraints related to var and transitively related constraints and variables in scope to target although the parent relationships of the added variables/constraints are then not correct. This method is intended for creating temporary projects/configurations.
        Parameters:
        var - the variable used as starting point for the transitive search
        scope - the search scope including imports
        target - the target project to add the elements to