public class ProtocolTransitionReferredMatcher extends BaseMatcher<ProtocolTransitionReferredMatch>
Use the pattern matcher on a given model via on(ViatraQueryEngine)
,
e.g. in conjunction with ViatraQueryEngine#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 VIATRA Query because of java.lang.IllegalArgumentException: Unhandled parameter types: [null]
// @Surrogate(feature = "result")
// @QueryExplorer(checked = false)
//pattern opaqueExpressionResult(source: OpaqueExpression, target: Parameter) {}
(if returnResult()- >notEmpty() then returnResult()- > exists(isOrdered) else false endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "isOrdered")
// @QueryExplorer(checked = false)
//pattern operationIsOrdered(source: Operation, target: Boolean) {}
(if returnResult()- >notEmpty() then returnResult()- >exists(isUnique) else true endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "isUnique")
// @QueryExplorer(checked = false)
//pattern operationIsUnique(source: Operation, target: Boolean) {}
(if returnResult()- >notEmpty() then returnResult()- >any(true).lower else null endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "lower")
// @QueryExplorer(checked = false)
//pattern operationLower(source: Operation, target: Integer) {}
(if returnResult()- >notEmpty() then returnResult()- >any(true).type else null endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "type")
// @QueryExplorer(checked = false)
//pattern operationType(source: Operation, target: Type) {}
(if returnResult()- >notEmpty() then returnResult()- >any(true).upper else null endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: returnResult
// @Surrogate(feature = "upper")
// @QueryExplorer(checked = false)
//pattern operationUpper(source: Operation, target: UnlimitedNatural) {}
(if self.type = String then defaultValue.stringValue() else null endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: stringValue
// @Surrogate(feature = "default")
// @QueryExplorer(checked = false)
//pattern parameterDefault(source: Parameter, target: String) {}
(if isConjugated then basicRequired() else basicProvided() endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: basicRequired
// @Surrogate(feature = "provided")
// @QueryExplorer(checked = false)
//pattern portProvided(source: Port, target: Interface) {}
(if isConjugated then basicProvided() else basicRequired() endif)
// Can't compile OCL to VIATRA Query because of java.lang.UnsupportedOperationException: basicProvided
// @Surrogate(feature = "required")
// @QueryExplorer(checked = false)
//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 VIATRA Query 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")
// @QueryExplorer(checked = false)
//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
engine, querySpecification
Modifier and Type | Method and Description |
---|---|
protected ProtocolTransitionReferredMatch |
arrayToMatch(java.lang.Object[] match)
Converts the array representation of a pattern match to an immutable Match object.
|
protected ProtocolTransitionReferredMatch |
arrayToMatchMutable(java.lang.Object[] match)
Converts the array representation of a pattern match to a mutable Match object.
|
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.
|
static ProtocolTransitionReferredMatcher |
create() |
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(ViatraQueryEngine engine)
Initializes the pattern matcher within an existing VIATRA Query engine.
|
static IQuerySpecification<ProtocolTransitionReferredMatcher> |
querySpecification() |
protected java.util.Set<org.eclipse.uml2.uml.Operation> |
rawAccumulateAllValuesOfoperation(java.lang.Object[] parameters)
Retrieve the set of values that occur in matches for operation.
|
protected java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> |
rawAccumulateAllValuesOfself(java.lang.Object[] parameters)
Retrieve the set of values that occur in matches for self.
|
protected ProtocolTransitionReferredMatch |
tupleToMatch(Tuple t) |
countMatches, countMatches, emptyArray, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getCapabilities, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, matchToArray, newEmptyMatch, newMatch, rawAccumulateAllValues, rawCountMatches, rawForEachMatch, rawForOneArbitraryMatch, rawGetAllMatches, rawGetAllValues, rawGetOneArbitraryMatch, rawHasMatch, setBackend
public static ProtocolTransitionReferredMatcher on(ViatraQueryEngine engine) throws ViatraQueryException
engine
- the existing VIATRA Query engine in which this matcher will be created.ViatraQueryException
- if an error occurs during pattern matcher creationpublic static ProtocolTransitionReferredMatcher create() throws ViatraQueryException
ViatraQueryException
- 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.protected java.util.Set<org.eclipse.uml2.uml.ProtocolTransition> rawAccumulateAllValuesOfself(java.lang.Object[] parameters)
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)
protected java.util.Set<org.eclipse.uml2.uml.Operation> rawAccumulateAllValuesOfoperation(java.lang.Object[] parameters)
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)
protected ProtocolTransitionReferredMatch tupleToMatch(Tuple t)
tupleToMatch
in class BaseMatcher<ProtocolTransitionReferredMatch>
protected ProtocolTransitionReferredMatch arrayToMatch(java.lang.Object[] match)
BaseMatcher
arrayToMatch
in class BaseMatcher<ProtocolTransitionReferredMatch>
protected ProtocolTransitionReferredMatch arrayToMatchMutable(java.lang.Object[] match)
BaseMatcher
arrayToMatchMutable
in class BaseMatcher<ProtocolTransitionReferredMatch>
public static IQuerySpecification<ProtocolTransitionReferredMatcher> querySpecification() throws ViatraQueryException
ViatraQueryException
- if the pattern definition could not be loaded