be.ac.vub.cocompose.operations
Class ApplySolutionPattern
java.lang.Object
be.ac.vub.cocompose.lang.DefaultModelVisitor
be.ac.vub.cocompose.lang.DefaultSuperModelVisitor
be.ac.vub.cocompose.lang.DefaultTraversingModelVisitor
be.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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApplySolutionPattern
public ApplySolutionPattern(ModelFactory factory)
- Creates a new ApplySolutionPattern operation.
- Parameters:
factory
- the factory to create new elements.
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)