public class ProtocolTransitionReferredMatcher extends BaseMatcher<ProtocolTransitionReferredMatch>
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 ProtocolTransitionReferredMatch
.
Original source:
(if behavior = null then
null
else
behavior.ownedParameter- >first()
endif)
// Can't compile OCL to IncQuery because of java.lang.IllegalArgumentException: Unhandled parameter types: [null]
// @Surrogate(feature = "result")
//pattern opaqueExpressionResult(source: OpaqueExpression, target: Parameter) {}
(if returnResult()- >notEmpty() then returnResult()- > exists(isOrdered) else false endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "isOrdered")
//pattern operationIsOrdered(source: Operation, target: Boolean) {}
(if returnResult()- >notEmpty() then returnResult()- >exists(isUnique) else true endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "isUnique")
//pattern operationIsUnique(source: Operation, target: Boolean) {}
(if returnResult()- >notEmpty() then returnResult()- >any(true).lower else null endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "lower")
//pattern operationLower(source: Operation, target: Integer) {}
(if returnResult()- >notEmpty() then returnResult()- >any(true).type else null endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "type")
//pattern operationType(source: Operation, target: Type) {}
(if returnResult()- >notEmpty() then returnResult()- >any(true).upper else null endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "upper")
//pattern operationUpper(source: Operation, target: UnlimitedNatural) {}
(if self.type = String then defaultValue.stringValue() else null endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: stringValue
// @Surrogate(feature = "default")
//pattern parameterDefault(source: Parameter, target: String) {}
(if isConjugated then basicRequired() else basicProvided() endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: basicRequired
// @Surrogate(feature = "provided")
//pattern portProvided(source: Port, target: Interface) {}
(if isConjugated then basicProvided() else basicRequired() endif)
// Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: basicProvided
// @Surrogate(feature = "required")
//pattern portRequired(source: Port, target: Interface) {}
(if association < > null and association.memberEnd- >size() = 2
then
association.memberEnd- >any(e | e < > self)
else
null
endif)
// 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.association.memberEnd- >any(e : Property | e. < >(self))
// @Surrogate(feature = "opposite")
//pattern propertyOpposite(source: Property, target: Property) {}
(trigger- >collect(event)- >select(oclIsKindOf(CallEvent))- >collect(oclAsType(CallEvent).operation)- >asSet())
@Surrogate(feature = "referred")
@QueryExplorer(checked = false)
pattern protocolTransitionReferred(
self : ProtocolTransition,
operation : Operation
) {
CallEvent(callEvent);
temp2 == callEvent;
Transition.trigger(self, trigger);
temp1 == trigger;
Trigger.event(temp1, event);
temp2 == event;
temp3 == temp2;
CallEvent.operation(temp3, operation);
}
ProtocolTransitionReferredMatch
,
ProtocolTransitionReferredProcessor
,
ProtocolTransitionReferredQuerySpecification
Constructor and Description |
---|
ProtocolTransitionReferredMatcher(IncQueryEngine engine)
Deprecated.
use
on(IncQueryEngine) instead |
ProtocolTransitionReferredMatcher(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.ProtocolTransition pSelf,
org.eclipse.uml2.uml.Operation pOperation)
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.ProtocolTransition pSelf,
org.eclipse.uml2.uml.Operation pOperation,
IMatchProcessor<? super ProtocolTransitionReferredMatch> 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.ProtocolTransition pSelf,
org.eclipse.uml2.uml.Operation pOperation,
IMatchProcessor<? super ProtocolTransitionReferredMatch> 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<ProtocolTransitionReferredMatch> |
getAllMatches(org.eclipse.uml2.uml.ProtocolTransition pSelf,
org.eclipse.uml2.uml.Operation pOperation)
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> |
getAllValuesOfoperation()
Retrieve the set of values that occur in matches for operation.
|
java.util.Set<org.eclipse.uml2.uml.Operation> |
getAllValuesOfoperation(org.eclipse.uml2.uml.ProtocolTransition pSelf)
Retrieve the set of values that occur in matches for operation.
|
java.util.Set<org.eclipse.uml2.uml.Operation> |
getAllValuesOfoperation(ProtocolTransitionReferredMatch partialMatch)
Retrieve the set of values that occur in matches for operation.
|
java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> |
getAllValuesOfself()
Retrieve the set of values that occur in matches for self.
|
java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> |
getAllValuesOfself(org.eclipse.uml2.uml.Operation pOperation)
Retrieve the set of values that occur in matches for self.
|
java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> |
getAllValuesOfself(ProtocolTransitionReferredMatch partialMatch)
Retrieve the set of values that occur in matches for self.
|
ProtocolTransitionReferredMatch |
getOneArbitraryMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf,
org.eclipse.uml2.uml.Operation pOperation)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
hasMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf,
org.eclipse.uml2.uml.Operation pOperation)
Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
under any possible substitution of the unspecified parameters (if any).
|
ProtocolTransitionReferredMatch |
newMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf,
org.eclipse.uml2.uml.Operation pOperation)
Returns a new (partial) match.
|
static ProtocolTransitionReferredMatcher |
on(IncQueryEngine engine)
Initializes the pattern matcher within an existing EMF-IncQuery engine.
|
static IQuerySpecification<ProtocolTransitionReferredMatcher> |
querySpecification() |
countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, newEmptyMatch, newMatch
@Deprecated public ProtocolTransitionReferredMatcher(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 ProtocolTransitionReferredMatcher(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 ProtocolTransitionReferredMatcher 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<ProtocolTransitionReferredMatch> getAllMatches(org.eclipse.uml2.uml.ProtocolTransition pSelf, org.eclipse.uml2.uml.Operation pOperation)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pOperation
- the fixed value of pattern parameter operation, or null if not bound.public ProtocolTransitionReferredMatch getOneArbitraryMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf, org.eclipse.uml2.uml.Operation pOperation)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pOperation
- the fixed value of pattern parameter operation, or null if not bound.public boolean hasMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf, org.eclipse.uml2.uml.Operation pOperation)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pOperation
- the fixed value of pattern parameter operation, or null if not bound.public int countMatches(org.eclipse.uml2.uml.ProtocolTransition pSelf, org.eclipse.uml2.uml.Operation pOperation)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pOperation
- the fixed value of pattern parameter operation, or null if not bound.public void forEachMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf, org.eclipse.uml2.uml.Operation pOperation, IMatchProcessor<? super ProtocolTransitionReferredMatch> processor)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pOperation
- the fixed value of pattern parameter operation, or null if not bound.processor
- the action that will process each pattern match.public boolean forOneArbitraryMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf, org.eclipse.uml2.uml.Operation pOperation, IMatchProcessor<? super ProtocolTransitionReferredMatch> processor)
pSelf
- the fixed value of pattern parameter self, or null if not bound.pOperation
- the fixed value of pattern parameter operation, or null if not bound.processor
- the action that will process the selected match.public ProtocolTransitionReferredMatch newMatch(org.eclipse.uml2.uml.ProtocolTransition pSelf, org.eclipse.uml2.uml.Operation pOperation)
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.pOperation
- the fixed value of pattern parameter operation, or null if not bound.public java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> getAllValuesOfself()
public java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> getAllValuesOfself(ProtocolTransitionReferredMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> getAllValuesOfself(org.eclipse.uml2.uml.Operation pOperation)
public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfoperation()
public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfoperation(ProtocolTransitionReferredMatch partialMatch)
public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfoperation(org.eclipse.uml2.uml.ProtocolTransition pSelf)
public static IQuerySpecification<ProtocolTransitionReferredMatcher> querySpecification() throws IncQueryException
IncQueryException
- if the pattern definition could not be loaded