public interface IQuerySpecification<Matcher extends IncQueryMatcher<? extends IPatternMatch>> extends PQueryHeader
As of 0.9.0, some internal details (mostly relevant for query evaluator backends) have been moved to getInternalQueryRepresentation()
.
Modifier and Type | Method and Description |
---|---|
PQuery |
getInternalQueryRepresentation()
Returns the definition of the query in a format intended for consumption by the query evaluator.
|
Matcher |
getMatcher(IncQueryEngine engine)
Initializes the pattern matcher within an existing
IncQueryEngine . |
Matcher |
getMatcher(org.eclipse.emf.common.notify.Notifier emfRoot)
Deprecated.
use
getMatcher(IncQueryEngine) instead, e.g. in conjunction with IncQueryEngine.on(Notifier) . |
java.lang.Class<? extends IncQueryScope> |
getPreferredScopeClass()
The query is formulated over this kind of modeling platform.
|
IPatternMatch |
newEmptyMatch()
Returns an empty, mutable Match compatible with matchers of this query.
|
IPatternMatch |
newMatch(java.lang.Object... parameters)
Returns a new (partial) Match object compatible with matchers of this query.
|
getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, getParameterNames, getParameters, getPositionOfParameter
@Deprecated Matcher getMatcher(org.eclipse.emf.common.notify.Notifier emfRoot) throws IncQueryException
getMatcher(IncQueryEngine)
instead, e.g. in conjunction with IncQueryEngine.on(Notifier)
.The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
The match set will be incrementally refreshed upon updates from this scope.
The matcher will be created within the managed IncQueryEngine
belonging to the EMF model root, so
multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
emfRoot
- the root of the EMF tree where the pattern matcher will operate. Recommended: Resource or ResourceSet.IncQueryException
- if an error occurs during pattern matcher creationMatcher getMatcher(IncQueryEngine engine) throws IncQueryException
IncQueryEngine
. If the pattern matcher is already
constructed in the engine, only a lightweight reference is created.
The match set will be incrementally refreshed upon updates.
engine
- the existing IncQuery engine in which this matcher will be created.IncQueryException
- if an error occurs during pattern matcher creationIPatternMatch newEmptyMatch()
IPatternMatch newMatch(java.lang.Object... parameters)
The returned match will be immutable. Use newEmptyMatch()
to obtain a mutable match object.
parameters
- the fixed value of pattern parameters, or null if not bound.java.lang.Class<? extends IncQueryScope> getPreferredScopeClass()
EMFScope
class is returned.PQuery getInternalQueryRepresentation()