public class Param2containmentMatcher extends BaseMatcher<Param2containmentMatch>
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 Param2containmentMatch
.
Original source:
@QueryExplorer(checked = false)
pattern param2containment(source, target, trace, containment : Containment) {
Trace.params(trace, source);
Trace.params(trace, target);
Trace.targets(trace, containment);
} or {
Trace.objects(trace, source);
Trace.params(trace, target);
Trace.targets(trace, containment);
} or {
Trace.params(trace, source);
Trace.objects(trace, target);
Trace.targets(trace, containment);
} or {
Trace.objects(trace, source);
Trace.objects(trace, target);
Trace.targets(trace, containment);
}
Param2containmentMatch
,
Param2containmentProcessor
,
Param2containmentQuerySpecification
Constructor and Description |
---|
Param2containmentMatcher(IncQueryEngine engine)
Deprecated.
use
on(IncQueryEngine) instead |
Param2containmentMatcher(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(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace,
Containment pContainment)
Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
|
void |
forEachMatch(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace,
Containment pContainment,
IMatchProcessor<? super Param2containmentMatch> processor)
Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
forOneArbitraryMatch(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace,
Containment pContainment,
IMatchProcessor<? super Param2containmentMatch> 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<Param2containmentMatch> |
getAllMatches(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace,
Containment pContainment)
Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
|
java.util.Set<Containment> |
getAllValuesOfcontainment()
Retrieve the set of values that occur in matches for containment.
|
java.util.Set<Containment> |
getAllValuesOfcontainment(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace)
Retrieve the set of values that occur in matches for containment.
|
java.util.Set<Containment> |
getAllValuesOfcontainment(Param2containmentMatch partialMatch)
Retrieve the set of values that occur in matches for containment.
|
java.util.Set<java.lang.Object> |
getAllValuesOfsource()
Retrieve the set of values that occur in matches for source.
|
java.util.Set<java.lang.Object> |
getAllValuesOfsource(java.lang.Object pTarget,
Trace pTrace,
Containment pContainment)
Retrieve the set of values that occur in matches for source.
|
java.util.Set<java.lang.Object> |
getAllValuesOfsource(Param2containmentMatch partialMatch)
Retrieve the set of values that occur in matches for source.
|
java.util.Set<java.lang.Object> |
getAllValuesOftarget()
Retrieve the set of values that occur in matches for target.
|
java.util.Set<java.lang.Object> |
getAllValuesOftarget(java.lang.Object pSource,
Trace pTrace,
Containment pContainment)
Retrieve the set of values that occur in matches for target.
|
java.util.Set<java.lang.Object> |
getAllValuesOftarget(Param2containmentMatch partialMatch)
Retrieve the set of values that occur in matches for target.
|
java.util.Set<Trace> |
getAllValuesOftrace()
Retrieve the set of values that occur in matches for trace.
|
java.util.Set<Trace> |
getAllValuesOftrace(java.lang.Object pSource,
java.lang.Object pTarget,
Containment pContainment)
Retrieve the set of values that occur in matches for trace.
|
java.util.Set<Trace> |
getAllValuesOftrace(Param2containmentMatch partialMatch)
Retrieve the set of values that occur in matches for trace.
|
Param2containmentMatch |
getOneArbitraryMatch(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace,
Containment pContainment)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
hasMatch(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace,
Containment pContainment)
Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
under any possible substitution of the unspecified parameters (if any).
|
Param2containmentMatch |
newMatch(java.lang.Object pSource,
java.lang.Object pTarget,
Trace pTrace,
Containment pContainment)
Returns a new (partial) match.
|
static Param2containmentMatcher |
on(IncQueryEngine engine)
Initializes the pattern matcher within an existing EMF-IncQuery engine.
|
static IQuerySpecification<Param2containmentMatcher> |
querySpecification() |
countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, newEmptyMatch, newMatch
@Deprecated public Param2containmentMatcher(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 Param2containmentMatcher(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 Param2containmentMatcher 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<Param2containmentMatch> getAllMatches(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace, Containment pContainment)
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.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pContainment
- the fixed value of pattern parameter containment, or null if not bound.public Param2containmentMatch getOneArbitraryMatch(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace, Containment pContainment)
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.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pContainment
- the fixed value of pattern parameter containment, or null if not bound.public boolean hasMatch(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace, Containment pContainment)
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.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pContainment
- the fixed value of pattern parameter containment, or null if not bound.public int countMatches(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace, Containment pContainment)
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.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pContainment
- the fixed value of pattern parameter containment, or null if not bound.public void forEachMatch(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace, Containment pContainment, IMatchProcessor<? super Param2containmentMatch> 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.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pContainment
- the fixed value of pattern parameter containment, or null if not bound.processor
- the action that will process each pattern match.public boolean forOneArbitraryMatch(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace, Containment pContainment, IMatchProcessor<? super Param2containmentMatch> 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.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pContainment
- the fixed value of pattern parameter containment, or null if not bound.processor
- the action that will process the selected match.public Param2containmentMatch newMatch(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace, Containment pContainment)
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.pTrace
- the fixed value of pattern parameter trace, or null if not bound.pContainment
- the fixed value of pattern parameter containment, or null if not bound.public java.util.Set<java.lang.Object> getAllValuesOfsource()
public java.util.Set<java.lang.Object> getAllValuesOfsource(Param2containmentMatch partialMatch)
public java.util.Set<java.lang.Object> getAllValuesOfsource(java.lang.Object pTarget, Trace pTrace, Containment pContainment)
public java.util.Set<java.lang.Object> getAllValuesOftarget()
public java.util.Set<java.lang.Object> getAllValuesOftarget(Param2containmentMatch partialMatch)
public java.util.Set<java.lang.Object> getAllValuesOftarget(java.lang.Object pSource, Trace pTrace, Containment pContainment)
public java.util.Set<Trace> getAllValuesOftrace()
public java.util.Set<Trace> getAllValuesOftrace(Param2containmentMatch partialMatch)
public java.util.Set<Trace> getAllValuesOftrace(java.lang.Object pSource, java.lang.Object pTarget, Containment pContainment)
public java.util.Set<Containment> getAllValuesOfcontainment()
public java.util.Set<Containment> getAllValuesOfcontainment(Param2containmentMatch partialMatch)
public java.util.Set<Containment> getAllValuesOfcontainment(java.lang.Object pSource, java.lang.Object pTarget, Trace pTrace)
public static IQuerySpecification<Param2containmentMatcher> querySpecification() throws IncQueryException
IncQueryException
- if the pattern definition could not be loaded