public abstract class GenericQuerySpecification<Matcher extends GenericPatternMatcher> extends BaseQuerySpecification<Matcher>
When available, consider using the pattern-specific generated matcher API instead.
The created matcher will be of type GenericPatternMatcher
. Matches of the pattern will be represented as
GenericPatternMatch
.
Note for overriding (if you have your own query language or ):
Derived classes should use defaultInstantiate(ViatraQueryEngine)
for implementing
BaseQuerySpecification.instantiate(ViatraQueryEngine)
if they use GenericPatternMatcher
proper.
GenericPatternMatcher
,
GenericPatternMatch
,
GenericMatchProcessor
wrappedPQuery
Constructor and Description |
---|
GenericQuerySpecification(PQuery wrappedPQuery)
Instantiates query specification for the given internal query representation.
|
Modifier and Type | Method and Description |
---|---|
protected GenericPatternMatcher |
defaultInstantiate(ViatraQueryEngine engine)
Derived classes should use this implementation of
BaseQuerySpecification.instantiate(ViatraQueryEngine)
if they use GenericPatternMatcher proper. |
GenericPatternMatch |
newEmptyMatch()
Returns an empty, mutable Match compatible with matchers of this query.
|
GenericPatternMatch |
newMatch(java.lang.Object... parameters)
Returns a new (partial) Match object compatible with matchers of this query.
|
ensureInitializedInternal, ensureInitializedInternalSneaky, getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, getInternalQueryRepresentation, getMatcher, getParameterNames, getParameters, getPositionOfParameter, instantiate, instantiate, processInitializerError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPreferredScopeClass
public GenericQuerySpecification(PQuery wrappedPQuery)
public GenericPatternMatch newEmptyMatch()
IQuerySpecification
public GenericPatternMatch newMatch(java.lang.Object... parameters)
IQuerySpecification
The returned match will be immutable. Use IQuerySpecification.newEmptyMatch()
to obtain a mutable match object.
parameters
- the fixed value of pattern parameters, or null if not bound.protected GenericPatternMatcher defaultInstantiate(ViatraQueryEngine engine) throws ViatraQueryException
BaseQuerySpecification.instantiate(ViatraQueryEngine)
if they use GenericPatternMatcher
proper.ViatraQueryException