public class OperationReturnResultMatcher extends BaseMatcher<OperationReturnResultMatch>
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 OperationReturnResultMatch
.
Original source:
(memberEnd- >reject(p | ownedEnd- >includes(p.oclAsType(ExtensionEnd)))- >any(true))
// Can't compile OCL to IncQuery because of java.lang.IllegalArgumentException: Iterator expression kind must be collect, select or reject instead of any in self.memberEnd- >reject(p : Property | self.ownedEnd- >includes(p.oclAsType(uml::ExtensionEnd)))- >any(temp1 : Property | true)
//pattern extensionMetaclassEnd(source: Extension, target: Property) {}
(if (lowerValue=null or lowerValue.integerValue()=null) then 1 else lowerValue.integerValue() endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: integerValue
//pattern multiplicityElementLowerBound(source: MultiplicityElement, target: Integer) {}
(if (upperValue=null or upperValue.unlimitedValue()=null) then 1 else upperValue.unlimitedValue() endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: unlimitedValue
//pattern multiplicityElementUpperBound(source: MultiplicityElement, target: UnlimitedNatural) {}
(ownedParameter- >select (direction = ParameterDirectionKind::return)- >asSet())
@QueryExplorer(checked = false)
pattern operationReturnResult(
self : Operation,
temp1 : Parameter
) {
Parameter.direction(temp1, parameterDirectionKind);
parameterDirectionKind_0 == ParameterDirectionKind::^return;
parameterDirectionKind == parameterDirectionKind_0;
BehavioralFeature.ownedParameter(self, parameter);
temp1 == parameter;
}
OperationReturnResultMatch
,
OperationReturnResultProcessor
,
OperationReturnResultQuerySpecification
Constructor and Description |
---|
OperationReturnResultMatcher(IncQueryEngine engine)
Deprecated.
use
on(IncQueryEngine) instead |
OperationReturnResultMatcher(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.Operation pSelf,
org.eclipse.uml2.uml.Parameter pTemp1)
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.Operation pSelf,
org.eclipse.uml2.uml.Parameter pTemp1,
IMatchProcessor<? super OperationReturnResultMatch> 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.Operation pSelf,
org.eclipse.uml2.uml.Parameter pTemp1,
IMatchProcessor<? super OperationReturnResultMatch> 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<OperationReturnResultMatch> |
getAllMatches(org.eclipse.uml2.uml.Operation pSelf,
org.eclipse.uml2.uml.Parameter pTemp1)
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.Operation> |
getAllValuesOfself()
Retrieve the set of values that occur in matches for self.
|
java.util.Set<org.eclipse.uml2.uml.Operation> |
getAllValuesOfself(OperationReturnResultMatch partialMatch)
Retrieve the set of values that occur in matches for self.
|
java.util.Set<org.eclipse.uml2.uml.Operation> |
getAllValuesOfself(org.eclipse.uml2.uml.Parameter pTemp1)
Retrieve the set of values that occur in matches for self.
|
java.util.Set<org.eclipse.uml2.uml.Parameter> |
getAllValuesOftemp1()
Retrieve the set of values that occur in matches for temp1.
|
java.util.Set<org.eclipse.uml2.uml.Parameter> |
getAllValuesOftemp1(org.eclipse.uml2.uml.Operation pSelf)
Retrieve the set of values that occur in matches for temp1.
|
java.util.Set<org.eclipse.uml2.uml.Parameter> |
getAllValuesOftemp1(OperationReturnResultMatch partialMatch)
Retrieve the set of values that occur in matches for temp1.
|
OperationReturnResultMatch |
getOneArbitraryMatch(org.eclipse.uml2.uml.Operation pSelf,
org.eclipse.uml2.uml.Parameter pTemp1)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
hasMatch(org.eclipse.uml2.uml.Operation pSelf,
org.eclipse.uml2.uml.Parameter pTemp1)
Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
under any possible substitution of the unspecified parameters (if any).
|
OperationReturnResultMatch |
newMatch(org.eclipse.uml2.uml.Operation pSelf,
org.eclipse.uml2.uml.Parameter pTemp1)
Returns a new (partial) match.
|
static OperationReturnResultMatcher |
on(IncQueryEngine engine)
Initializes the pattern matcher within an existing EMF-IncQuery engine.
|
static IQuerySpecification<OperationReturnResultMatcher> |
querySpecification() |
countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, newEmptyMatch, newMatch
@Deprecated public OperationReturnResultMatcher(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 OperationReturnResultMatcher(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 OperationReturnResultMatcher 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<OperationReturnResultMatch> getAllMatches(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pTemp1
- the fixed value of pattern parameter temp1, or null if not bound.public OperationReturnResultMatch getOneArbitraryMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pTemp1
- the fixed value of pattern parameter temp1, or null if not bound.public boolean hasMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pTemp1
- the fixed value of pattern parameter temp1, or null if not bound.public int countMatches(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pTemp1
- the fixed value of pattern parameter temp1, or null if not bound.public void forEachMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1, IMatchProcessor<? super OperationReturnResultMatch> processor)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pTemp1
- the fixed value of pattern parameter temp1, or null if not bound.processor
- the action that will process each pattern match.public boolean forOneArbitraryMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1, IMatchProcessor<? super OperationReturnResultMatch> processor)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pTemp1
- the fixed value of pattern parameter temp1, or null if not bound.processor
- the action that will process the selected match.public OperationReturnResultMatch newMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)
The returned match will be immutable. Use BaseMatcher.newEmptyMatch()
to obtain a mutable match object.
pSelf
- the fixed value of pattern parameter self, or null if not bound.pTemp1
- the fixed value of pattern parameter temp1, or null if not bound.public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfself()
public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfself(OperationReturnResultMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfself(org.eclipse.uml2.uml.Parameter pTemp1)
public java.util.Set<org.eclipse.uml2.uml.Parameter> getAllValuesOftemp1()
public java.util.Set<org.eclipse.uml2.uml.Parameter> getAllValuesOftemp1(OperationReturnResultMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.Parameter> getAllValuesOftemp1(org.eclipse.uml2.uml.Operation pSelf)
public static IQuerySpecification<OperationReturnResultMatcher> querySpecification() throws IncQueryException
IncQueryException
- if the pattern definition could not be loaded