org.eclipse.incquery.patternlanguage.emf.specification

## Class GenericPatternMatcher

- java.lang.Object
- - org.eclipse.incquery.runtime.internal.apiimpl.QueryResultWrapper
  - - org.eclipse.incquery.runtime.api.impl.BaseMatcher<GenericPatternMatch>
    - - org.eclipse.incquery.runtime.api.GenericPatternMatcher
      - - org.eclipse.incquery.patternlanguage.emf.specification.GenericPatternMatcher

- All Implemented Interfaces:
    IncQueryMatcher<GenericPatternMatch>

  Deprecated.
  direct reference not recommended. As of 0.9, clients should use `SpecificationBuilder` to convert EMF patterns to `IQuerySpecification`s, or `GenericPatternMatcher` for other purposes. Note that the class `GenericPatternMatch` has also been moved.

      @Deprecated
      public class GenericPatternMatcher
      extends GenericPatternMatcher

  This is a generic pattern matcher for any EMF-IncQuery pattern, with "interpretative" query execution. Use the pattern matcher on a given model via `on(IncQueryEngine, Pattern)`, e.g. in conjunction with `IncQueryEngine.on(Notifier)`.

  Whenever available, consider using the pattern-specific generated matcher API instead.

  Matches of the pattern will be represented as `GenericPatternMatch`.

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

- - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GenericPatternMatcher` | `on(IncQueryEngine engine, GenericQuerySpecification querySpecification)` Deprecated. Initializes the pattern matcher within an existing EMF-IncQuery engine.
    `static GenericPatternMatcher` | `on(IncQueryEngine engine, Pattern pattern)` Deprecated. Initializes the pattern matcher within an existing EMF-IncQuery engine.

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

      `arrayToMatch, arrayToMatchMutable, getSpecification`

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

      `countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, hasMatch, newEmptyMatch, newMatch`

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

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

- - ### Method Detail

    - #### on

          public static GenericPatternMatcher on(IncQueryEngine engine,
                                                 Pattern pattern)
                                          throws IncQueryException

      Deprecated.
      Initializes the pattern matcher within an existing EMF-IncQuery engine. If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. The match set will be incrementally refreshed upon updates.
      Parameters:
        `engine` - the existing EMF-IncQuery engine in which this matcher will be created.
        `pattern` - the EMF-IncQuery pattern for which the matcher is to be constructed.
      Throws:
        `IncQueryException` - if an error occurs during pattern matcher creation

    - #### on

          public static GenericPatternMatcher on(IncQueryEngine engine,
                                                 GenericQuerySpecification querySpecification)
                                          throws IncQueryException

      Deprecated.
      Initializes the pattern matcher within an existing EMF-IncQuery engine. If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. The match set will be incrementally refreshed upon updates.
      Parameters:
        `engine` - the existing EMF-IncQuery engine in which this matcher will be created.
        `querySpecification` - the query specification for which the matcher is to be constructed.
      Throws:
        `IncQueryException` - if an error occurs during pattern matcher creation