public class ElementOwnedElementMatcher extends BaseMatcher<ElementOwnedElementMatch>
Use the pattern matcher on a given model via on(IncQueryEngine)
,
e.g. in conjunction with IncQueryEngine.on(Notifier)
.
Matches of the pattern will be represented as ElementOwnedElementMatch
.
Original source:
@Surrogate(feature = "ownedElement")
@QueryExplorer(checked = false)
pattern elementOwnedElement(source: Element, target: Element)
{ Abstraction.mapping(source, target); } or
{ AcceptEventAction.trigger(source, target); } or
{ find actionInput(source, target); } or
{ Action.localPostcondition(source, target); } or
{ Action.localPrecondition(source, target); } or
{ find actionOutput(source, target); } or
{ ActionInputPin.fromAction(source, target); } or
{ Activity.edge(source, target); } or
{ find activityGroup(source, target); } or
{ find activityNode(source, target); } or
{ ActivityEdge.guard(source, target); } or
{ ActivityEdge.weight(source, target); } or
{ find activityGroupSubgroup(source, target); } or
{ Artifact.manifestation(source, target); } or
{ BehavioredClassifier.interfaceRealization(source, target); } or
{ ChangeEvent.changeExpression(source, target); } or
{ Classifier.collaborationUse(source, target); } or
{ Classifier.generalization(source, target); } or
{ Classifier.substitution(source, target); } or
{ CollaborationUse.roleBinding(source, target); } or
{ CombinedFragment.cfragmentGate(source, target); } or
{ CombinedFragment.operand(source, target); } or
{ Component.realization(source, target); } or
{ ConditionalNode.clause(source, target); } or
{ Connector.end(source, target); } or
{ Constraint.specification(source, target); } or
{ Deployment.configuration(source, target); } or
{ DeploymentTarget.deployment(source, target); } or
{ Duration.expr(source, target); } or
{ Element.ownedComment(source, target); } or
{ ExecutableNode.handler(source, target); } or
{ Expression.operand(source, target); } or
{ Extend.condition(source, target); } or
{ InstanceSpecification.slot(source, target); } or
{ InstanceSpecification.specification(source, target); } or
{ Interaction.action(source, target); } or
{ InteractionConstraint.maxint(source, target); } or
{ InteractionConstraint.minint(source, target); } or
{ InteractionFragment.generalOrdering(source, target); } or
{ InteractionOperand.guard(source, target); } or
{ InteractionUse.actualGate(source, target); } or
{ InteractionUse.argument(source, target); } or
{ InteractionUse.returnValue(source, target); } or
{ JoinNode.joinSpec(source, target); } or
{ Lifeline.selector(source, target); } or
{ LinkAction.endData(source, target); } or
{ LinkEndData.qualifier(source, target); } or
{ LoopNode.loopVariable(source, target); } or
{ Message.argument(source, target); } or
{ MultiplicityElement.lowerValue(source, target); } or
{ MultiplicityElement.upperValue(source, target); } or
{ NamedElement.nameExpression(source, target); } or
{ Namespace.elementImport(source, target); } or
{ find namespaceOwnedMember(source, target); } or
{ Namespace.packageImport(source, target); } or
{ ObjectNode.upperBound(source, target); } or
{ Package.packageMerge(source, target); } or
{ Package.profileApplication(source, target); } or
{ Parameter.defaultValue(source, target); } or
{ ParameterSet.condition(source, target); } or
{ Property.defaultValue(source, target); } or
{ Property.qualifier(source, target); } or
{ ProtocolStateMachine.conformance(source, target); } or
{ Slot.value(source, target); } or
{ State.deferrableTrigger(source, target); } or
{ State.doActivity(source, target); } or
{ State.entry(source, target); } or
{ State.exit(source, target); } or
{ StateInvariant.invariant(source, target); } or
{ Stereotype.icon(source, target); } or
{ StringExpression.subExpression(source, target); } or
{ StructuredActivityNode.edge(source, target); } or
{ StructuredActivityNode.node(source, target); } or
{ TemplateBinding.parameterSubstitution(source, target); } or
{ TemplateParameter.ownedDefault(source, target); } or
{ TemplateParameter.ownedParameteredElement(source, target); } or
{ TemplateParameterSubstitution.ownedActual(source, target); } or
{ TemplateSignature.ownedParameter(source, target); } or
{ TemplateableElement.ownedTemplateSignature(source, target); } or
{ TemplateableElement.templateBinding(source, target); } or
{ TimeEvent.when(source, target); } or
{ TimeExpression.expr(source, target); } or
{ Transition.effect(source, target); } or
{ Transition.trigger(source, target); } or
{ ValuePin.value(source, target); } or
{ ValueSpecificationAction.value(source, target); }
ElementOwnedElementMatch
,
ElementOwnedElementProcessor
,
ElementOwnedElementQuerySpecification
Constructor and Description |
---|
ElementOwnedElementMatcher(IncQueryEngine engine)
Deprecated.
use
on(IncQueryEngine) instead |
ElementOwnedElementMatcher(org.eclipse.emf.common.notify.Notifier emfRoot)
Deprecated.
use
on(IncQueryEngine) instead, e.g. in conjunction with IncQueryEngine.on(Notifier) |
Modifier and Type | Method and Description |
---|---|
int |
countMatches(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
|
void |
forEachMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget,
IMatchProcessor<? super ElementOwnedElementMatch> processor)
Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
forOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget,
IMatchProcessor<? super ElementOwnedElementMatch> processor)
Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
java.util.Collection<ElementOwnedElementMatch> |
getAllMatches(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOfsource()
Retrieve the set of values that occur in matches for source.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOfsource(org.eclipse.uml2.uml.Element pTarget)
Retrieve the set of values that occur in matches for source.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOfsource(ElementOwnedElementMatch partialMatch)
Retrieve the set of values that occur in matches for source.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOftarget()
Retrieve the set of values that occur in matches for target.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOftarget(org.eclipse.uml2.uml.Element pSource)
Retrieve the set of values that occur in matches for target.
|
java.util.Set<org.eclipse.uml2.uml.Element> |
getAllValuesOftarget(ElementOwnedElementMatch partialMatch)
Retrieve the set of values that occur in matches for target.
|
ElementOwnedElementMatch |
getOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
hasMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
under any possible substitution of the unspecified parameters (if any).
|
ElementOwnedElementMatch |
newMatch(org.eclipse.uml2.uml.Element pSource,
org.eclipse.uml2.uml.Element pTarget)
Returns a new (partial) match.
|
static ElementOwnedElementMatcher |
on(IncQueryEngine engine)
Initializes the pattern matcher within an existing EMF-IncQuery engine.
|
static IQuerySpecification<ElementOwnedElementMatcher> |
querySpecification() |
countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, newEmptyMatch, newMatch
@Deprecated public ElementOwnedElementMatcher(org.eclipse.emf.common.notify.Notifier emfRoot) throws IncQueryException
on(IncQueryEngine)
instead, e.g. in conjunction with IncQueryEngine.on(Notifier)
The matcher will be created within the managed IncQueryEngine
belonging to the EMF model root, so
multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
emfRoot
- the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.IncQueryException
- if an error occurs during pattern matcher creation@Deprecated public ElementOwnedElementMatcher(IncQueryEngine engine) throws IncQueryException
on(IncQueryEngine)
insteadengine
- the existing EMF-IncQuery engine in which this matcher will be created.IncQueryException
- if an error occurs during pattern matcher creationpublic static ElementOwnedElementMatcher on(IncQueryEngine engine) throws IncQueryException
engine
- the existing EMF-IncQuery engine in which this matcher will be created.IncQueryException
- if an error occurs during pattern matcher creationpublic java.util.Collection<ElementOwnedElementMatch> getAllMatches(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public ElementOwnedElementMatch getOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public boolean hasMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public int countMatches(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public void forEachMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget, IMatchProcessor<? super ElementOwnedElementMatch> processor)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.processor
- the action that will process each pattern match.public boolean forOneArbitraryMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget, IMatchProcessor<? super ElementOwnedElementMatch> processor)
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.processor
- the action that will process the selected match.public ElementOwnedElementMatch newMatch(org.eclipse.uml2.uml.Element pSource, org.eclipse.uml2.uml.Element pTarget)
The returned match will be immutable. Use BaseMatcher.newEmptyMatch()
to obtain a mutable match object.
pSource
- the fixed value of pattern parameter source, or null if not bound.pTarget
- the fixed value of pattern parameter target, or null if not bound.public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOfsource()
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOfsource(ElementOwnedElementMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOfsource(org.eclipse.uml2.uml.Element pTarget)
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOftarget()
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOftarget(ElementOwnedElementMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.Element> getAllValuesOftarget(org.eclipse.uml2.uml.Element pSource)
public static IQuerySpecification<ElementOwnedElementMatcher> querySpecification() throws IncQueryException
IncQueryException
- if the pattern definition could not be loaded