org.eclipse.incquery.patternlanguage.emf.specification

## Class GenericQuerySpecification

- java.lang.Object
- - org.eclipse.incquery.runtime.api.impl.BaseQuerySpecification<Matcher>
  - - org.eclipse.incquery.runtime.api.GenericQuerySpecification<GenericPatternMatcher>
    - - org.eclipse.incquery.patternlanguage.emf.specification.GenericQuerySpecification

- All Implemented Interfaces:
    IQuerySpecification<GenericPatternMatcher>, PQueryHeader

      public class GenericQuerySpecification
      extends GenericQuerySpecification<GenericPatternMatcher>

  This is a generic query specification for EMF-IncQuery 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.incquery.runtime.api.GenericPatternMatcher. Matches of the pattern will be represented as GenericPatternMatch.

  Author:
    Bergmann Gábor
  See Also:
    `GenericPatternMatcher`, `GenericPatternMatch`, `GenericMatchProcessor`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenericQuerySpecification(GenericEMFPatternPQuery genericEMFPatternPQuery)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GenericEMFPatternPQuery` | `getInternalQueryRepresentation()` Returns the definition of the query in a format intended for consumption by the query evaluator.
    `java.lang.Class<? extends IncQueryScope>` | `getPreferredScopeClass()` The query is formulated over this kind of modeling platform.
    `GenericPatternMatcher` | `instantiate(IncQueryEngine engine)`

    - ### Methods inherited from class org.eclipse.incquery.runtime.api.GenericQuerySpecification

      `newEmptyMatch, newMatch`

    - ### Methods inherited from class org.eclipse.incquery.runtime.api.impl.BaseQuerySpecification

      `getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, getMatcher, getMatcher, getParameterNames, getParameters, getPositionOfParameter`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GenericQuerySpecification

          public GenericQuerySpecification(GenericEMFPatternPQuery genericEMFPatternPQuery)

  - ### Method Detail

    - #### getInternalQueryRepresentation

          public GenericEMFPatternPQuery getInternalQueryRepresentation()

      Description copied from interface: `IQuerySpecification`
      Returns the definition of the query in a format intended for consumption by the query evaluator.
      Specified by:
        `getInternalQueryRepresentation` in interface `IQuerySpecification<GenericPatternMatcher>`
      Overrides:
        `getInternalQueryRepresentation` in class `BaseQuerySpecification<GenericPatternMatcher>`
      Returns:
        the internal representation of the query.

    - #### instantiate

          public GenericPatternMatcher instantiate(IncQueryEngine engine)
                                            throws IncQueryException

      Throws:
        `IncQueryException`

    - #### getPreferredScopeClass

          public java.lang.Class<? extends IncQueryScope> 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.