Class 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 a SpecificationBuilder instance), 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
    • Constructor Detail

    • Method Detail

      • instantiate

        public org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher instantiate​(ViatraQueryEngine engine)
        Specified by:
        instantiate in class BaseQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>
      • getPreferredScopeClass

        public java.lang.Class<? extends QueryScope> getPreferredScopeClass()
        Description copied from interface: IQuerySpecification
        The query is formulated over this kind of modeling platform. E.g. for queries over EMF models, the EMFScope class is returned.
      • instantiate

        public org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher instantiate()
        Description copied from class: BaseQuerySpecification
        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.
        Specified by:
        instantiate in interface IQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>
        Overrides:
        instantiate in class BaseQuerySpecification<org.eclipse.viatra.query.patternlanguage.emf.specification.GenericPatternMatcher>
        Since:
        1.4