public class UnreferredStereotypesMatcher extends org.eclipse.viatra.query.runtime.api.impl.BaseMatcher<UnreferredStereotypesMatch>
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 UnreferredStereotypesMatch
.
Original source:
Returns stereotypes that are not assigned to any classes and none of whose attrubutes are referred.
pattern unreferredStereotypes(stereotype : Stereotype) {
neg find usedStereotypes(stereotype);
}
UnreferredStereotypesMatch
,
UnreferredStereotypesProcessor
,
UnreferredStereotypesQuerySpecification
Modifier and Type | Method and Description |
---|---|
protected UnreferredStereotypesMatch |
arrayToMatch(java.lang.Object[] match) |
protected UnreferredStereotypesMatch |
arrayToMatchMutable(java.lang.Object[] match) |
int |
countMatches(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
|
static UnreferredStereotypesMatcher |
create() |
void |
forEachMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype,
org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super UnreferredStereotypesMatch> processor)
Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
forOneArbitraryMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype,
org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super UnreferredStereotypesMatch> 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<UnreferredStereotypesMatch> |
getAllMatches(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
|
java.util.Set<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> |
getAllValuesOfstereotype()
Retrieve the set of values that occur in matches for stereotype.
|
UnreferredStereotypesMatch |
getOneArbitraryMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
|
boolean |
hasMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
under any possible substitution of the unspecified parameters (if any).
|
UnreferredStereotypesMatch |
newMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
Returns a new (partial) match.
|
static UnreferredStereotypesMatcher |
on(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine)
Initializes the pattern matcher within an existing VIATRA Query engine.
|
static org.eclipse.viatra.query.runtime.api.IQuerySpecification<UnreferredStereotypesMatcher> |
querySpecification() |
protected java.util.Set<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> |
rawAccumulateAllValuesOfstereotype(java.lang.Object[] parameters)
Retrieve the set of values that occur in matches for stereotype.
|
protected UnreferredStereotypesMatch |
tupleToMatch(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple t) |
countMatches, countMatches, emptyArray, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getCapabilities, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, hasMatch, matchToArray, newEmptyMatch, newMatch, rawAccumulateAllValues, rawCountMatches, rawForEachMatch, rawForOneArbitraryMatch, rawGetAllMatches, rawGetAllValues, rawGetOneArbitraryMatch, rawHasMatch, setBackend
public static UnreferredStereotypesMatcher on(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine)
engine
- the existing VIATRA Query engine in which this matcher will be created.ViatraQueryRuntimeException
- if an error occurs during pattern matcher creationpublic static UnreferredStereotypesMatcher create()
ViatraQueryRuntimeException
- if an error occurs during pattern matcher creationpublic java.util.Collection<UnreferredStereotypesMatch> getAllMatches(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
pStereotype
- the fixed value of pattern parameter stereotype, or null if not bound.public UnreferredStereotypesMatch getOneArbitraryMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
pStereotype
- the fixed value of pattern parameter stereotype, or null if not bound.public boolean hasMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
pStereotype
- the fixed value of pattern parameter stereotype, or null if not bound.public int countMatches(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
pStereotype
- the fixed value of pattern parameter stereotype, or null if not bound.public void forEachMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype, org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super UnreferredStereotypesMatch> processor)
pStereotype
- the fixed value of pattern parameter stereotype, or null if not bound.processor
- the action that will process each pattern match.public boolean forOneArbitraryMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype, org.eclipse.viatra.query.runtime.api.IMatchProcessor<? super UnreferredStereotypesMatch> processor)
pStereotype
- the fixed value of pattern parameter stereotype, or null if not bound.processor
- the action that will process the selected match.public UnreferredStereotypesMatch newMatch(com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype pStereotype)
The returned match will be immutable. Use BaseMatcher.newEmptyMatch()
to obtain a mutable match object.
pStereotype
- the fixed value of pattern parameter stereotype, or null if not bound.protected java.util.Set<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> rawAccumulateAllValuesOfstereotype(java.lang.Object[] parameters)
public java.util.Set<com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype> getAllValuesOfstereotype()
protected UnreferredStereotypesMatch tupleToMatch(org.eclipse.viatra.query.runtime.matchers.tuple.Tuple t)
tupleToMatch
in class org.eclipse.viatra.query.runtime.api.impl.BaseMatcher<UnreferredStereotypesMatch>
protected UnreferredStereotypesMatch arrayToMatch(java.lang.Object[] match)
arrayToMatch
in class org.eclipse.viatra.query.runtime.api.impl.BaseMatcher<UnreferredStereotypesMatch>
protected UnreferredStereotypesMatch arrayToMatchMutable(java.lang.Object[] match)
arrayToMatchMutable
in class org.eclipse.viatra.query.runtime.api.impl.BaseMatcher<UnreferredStereotypesMatch>
public static org.eclipse.viatra.query.runtime.api.IQuerySpecification<UnreferredStereotypesMatcher> querySpecification()
ViatraQueryRuntimeException
- if the pattern definition could not be loaded