Class BaseGeneratedEMFQuerySpecificationWithGenericMatcher
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification<Matcher>
-
- org.eclipse.viatra.query.runtime.api.GenericQuerySpecification<GenericPatternMatcher>
-
- org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher
-
- All Implemented Interfaces:
IQuerySpecification<GenericPatternMatcher>,PQueryHeader
public abstract class BaseGeneratedEMFQuerySpecificationWithGenericMatcher extends GenericQuerySpecification<GenericPatternMatcher>
Provides common functionality of pattern-specific generated query specifications for without generated pattern-specific match and matcher classes, including private patterns.- Since:
- 1.7
-
-
Field Summary
-
Fields inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification
wrappedPQuery
-
-
Constructor Summary
Constructors Constructor Description BaseGeneratedEMFQuerySpecificationWithGenericMatcher(PQuery wrappedPQuery)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends QueryScope>getPreferredScopeClass()The query is formulated over this kind of modeling platform.GenericPatternMatcherinstantiate()For backward compatibility of code generated with previous versions of viatra query, this method has a default implementation returning null, indicating that a matcher can only be created using the old method, which ignores the hints provided by the user.protected GenericPatternMatcherinstantiate(ViatraQueryEngine engine)GenericPatternMatchnewEmptyMatch()Returns an empty, mutable Match compatible with matchers of this query.GenericPatternMatchnewMatch(java.lang.Object... parameters)Returns a new (partial) Match object compatible with matchers of this query.-
Methods inherited from class org.eclipse.viatra.query.runtime.api.GenericQuerySpecification
defaultInstantiate, getVisibility
-
Methods inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification
ensureInitializedInternal, getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, getInternalQueryRepresentation, getMatcher, getParameterNames, getParameters, getPositionOfParameter, processInitializerError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.viatra.query.runtime.api.IQuerySpecification
getPProblems, getStatus
-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQueryHeader
getParameter, getSimpleName
-
-
-
-
Constructor Detail
-
BaseGeneratedEMFQuerySpecificationWithGenericMatcher
public BaseGeneratedEMFQuerySpecificationWithGenericMatcher(PQuery wrappedPQuery)
-
-
Method Detail
-
getPreferredScopeClass
public java.lang.Class<? extends QueryScope> getPreferredScopeClass()
Description copied from interface:IQuerySpecificationThe query is formulated over this kind of modeling platform. E.g. for queries over EMF models, theEMFScopeclass is returned.
-
instantiate
protected GenericPatternMatcher instantiate(ViatraQueryEngine engine)
- Specified by:
instantiatein classBaseQuerySpecification<GenericPatternMatcher>
-
instantiate
public GenericPatternMatcher instantiate()
Description copied from class:BaseQuerySpecificationFor backward compatibility of code generated with previous versions of viatra query, this method has a default implementation returning null, indicating that a matcher can only be created using the old method, which ignores the hints provided by the user.- Specified by:
instantiatein interfaceIQuerySpecification<GenericPatternMatcher>- Overrides:
instantiatein classBaseQuerySpecification<GenericPatternMatcher>
-
newEmptyMatch
public GenericPatternMatch newEmptyMatch()
Description copied from interface:IQuerySpecificationReturns an empty, mutable Match compatible with matchers of this query. Fields of the mutable match can be filled to create a partial match, usable as matcher input. This can be used to call the matcher with a partial match even if the specific class of the matcher or the match is unknown.- Specified by:
newEmptyMatchin interfaceIQuerySpecification<GenericPatternMatcher>- Overrides:
newEmptyMatchin classGenericQuerySpecification<GenericPatternMatcher>- Returns:
- the empty match
-
newMatch
public GenericPatternMatch newMatch(java.lang.Object... parameters)
Description copied from interface:IQuerySpecificationReturns a new (partial) Match object compatible with matchers of this query. This can be used e.g. to call the matcher with a partial match.The returned match will be immutable. Use
IQuerySpecification.newEmptyMatch()to obtain a mutable match object.- Specified by:
newMatchin interfaceIQuerySpecification<GenericPatternMatcher>- Overrides:
newMatchin classGenericQuerySpecification<GenericPatternMatcher>- Parameters:
parameters- the fixed value of pattern parameters, or null if not bound.- Returns:
- the (partial) match object.
-
-