be.ac.vub.cocompose.operations
Class ApplySolutionPattern

java.lang.Object
  extended bybe.ac.vub.cocompose.lang.DefaultModelVisitor
      extended bybe.ac.vub.cocompose.lang.DefaultSuperModelVisitor
          extended bybe.ac.vub.cocompose.lang.DefaultTraversingModelVisitor
              extended bybe.ac.vub.cocompose.operations.ApplySolutionPattern
All Implemented Interfaces:
ModelVisitor

public class ApplySolutionPattern
extends DefaultTraversingModelVisitor

Applies a solution pattern. Uses LinkSolutionPattern to create links after all elements have been created.

Since:
0.2.11
Version:
0.2.11, 17/05/2004
Author:
Dennis Wagelaar

Field Summary
 
Fields inherited from class be.ac.vub.cocompose.lang.DefaultModelVisitor
current
 
Constructor Summary
ApplySolutionPattern(ModelFactory factory)
          Creates a new ApplySolutionPattern operation.
 
Method Summary
 void apply(SolutionPattern pattern)
          Applies the given solution pattern.
 void visitConcept(Concept concept)
          Inserts the given concept into the target model.
 
Methods inherited from class be.ac.vub.cocompose.lang.DefaultTraversingModelVisitor
visitNamespace, visitRole
 
Methods inherited from class be.ac.vub.cocompose.lang.DefaultSuperModelVisitor
visitAndConstraint, visitCompositeConstraint, visitConstraint, visitElementConstraint, visitImplementationGenerator, visitImplementationPattern, visitImplementationRolePart, visitModel, visitModelProperty, visitModelTransformation, visitMultiplicity, visitOrConstraint, visitProperty, visitRefinedElement, visitRefinement, visitRelationElement, visitRelationship, visitSimpleProperty, visitSolutionPattern
 
Methods inherited from class be.ac.vub.cocompose.lang.DefaultModelVisitor
getStacked, setStacked, visit, visitModelElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplySolutionPattern

public ApplySolutionPattern(ModelFactory factory)
Creates a new ApplySolutionPattern operation.

Parameters:
factory - the factory to create new elements.
Method Detail

apply

public void apply(SolutionPattern pattern)
           throws ModelElementException
Applies the given solution pattern.

Parameters:
pattern - the solution pattern to apply.
Throws:
ModelElementException - if the solution pattern cannot be applied.

visitConcept

public void visitConcept(Concept concept)
                  throws ModelElementException
Inserts the given concept into the target model.

Specified by:
visitConcept in interface ModelVisitor
Overrides:
visitConcept in class DefaultSuperModelVisitor
Parameters:
concept - - the element to visit.
Throws:
ModelElementException
See Also:
ModelVisitor.visitConcept(be.ac.vub.cocompose.lang.core.Concept)