Class GenericQuerySpecification
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification<Matcher>
-
- org.eclipse.viatra.query.runtime.api.GenericQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>
-
- org.eclipse.viatra.query.patternlanguage.emf.specification.GenericQuerySpecification
-
- All Implemented Interfaces:
IQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>,PQueryHeader
public class GenericQuerySpecification extends GenericQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>
This is a generic query specification for VIATRA Query pattern matchers, for "interpretative" query execution. Instantiate the specification with any registered pattern (or through aSpecificationBuilderinstance), and then use the specification to obtain an actual pattern matcher operating on a given model.When available, consider using the pattern-specific generated matcher API instead.
The created matcher will be of type org.eclipse.viatra.query.runtime.api.GenericPatternMatcher. Matches of the pattern will be represented as GenericPatternMatch.
- See Also:
GenericPatternMatcher,GenericPatternMatch,GenericMatchProcessor- No Instantiate:
- This class is not intended to be instantiated by clients
-
-
Field Summary
Fields Modifier and Type Field Description protected GenericEMFPatternPQuerygenericEMFPatternPQuery-
Fields inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification
wrappedPQuery
-
-
Constructor Summary
Constructors Constructor Description GenericQuerySpecification(GenericEMFPatternPQuery genericEMFPatternPQuery)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenericEMFPatternPQuerygetInternalQueryRepresentation()Returns the definition of the query in a format intended for consumption by the query evaluator.java.lang.Class<? extends QueryScope>getPreferredScopeClass()The query is formulated over this kind of modeling platform.org.eclipse.viatra.query.patternlanguage.emf.specification.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.org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcherinstantiate(ViatraQueryEngine engine)-
Methods inherited from class org.eclipse.viatra.query.runtime.api.GenericQuerySpecification
defaultInstantiate, getVisibility, newEmptyMatch, newMatch
-
Methods inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification
ensureInitializedInternal, getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, 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
-
-
-
-
Field Detail
-
genericEMFPatternPQuery
protected GenericEMFPatternPQuery genericEMFPatternPQuery
-
-
Constructor Detail
-
GenericQuerySpecification
public GenericQuerySpecification(GenericEMFPatternPQuery genericEMFPatternPQuery)
-
-
Method Detail
-
getInternalQueryRepresentation
public GenericEMFPatternPQuery getInternalQueryRepresentation()
Description copied from interface:IQuerySpecificationReturns the definition of the query in a format intended for consumption by the query evaluator.- Specified by:
getInternalQueryRepresentationin interfaceIQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>- Overrides:
getInternalQueryRepresentationin classBaseQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>- Returns:
- the internal representation of the query.
-
instantiate
public org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher instantiate(ViatraQueryEngine engine)
- Specified by:
instantiatein classBaseQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>
-
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
public org.eclipse.viatra.query.patternlanguage.emf.specification.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<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>- Overrides:
instantiatein classBaseQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>- Since:
- 1.4
-
-