org.eclipse.incquery.runtime.api

## 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

- All Implemented Interfaces:
    IncQueryMatcher<GenericPatternMatch>
  Direct Known Subclasses:
    GenericPatternMatcher

      public class GenericPatternMatcher
      extends BaseMatcher<GenericPatternMatch>

  This is a generic pattern matcher for any IncQuery pattern, with "interpretative" query execution. To use the pattern matcher on a given model, obtain a `GenericQuerySpecification` first, then invoke e.g. `BaseQuerySpecification.getMatcher(IncQueryEngine)`. in conjunction with `IncQueryEngine.on(org.eclipse.incquery.runtime.api.scope.IncQueryScope)`.

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

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

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

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GenericPatternMatch` | `arrayToMatch(java.lang.Object[] parameters)` Converts the array representation of a pattern match to an immutable Match object.
    `GenericPatternMatch` | `arrayToMatchMutable(java.lang.Object[] parameters)` Converts the array representation of a pattern match to a mutable Match object.
    `GenericQuerySpecification<? extends GenericPatternMatcher>` | `getSpecification()` The pattern that will be matched.

    - ### 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

    - #### arrayToMatch

          public GenericPatternMatch arrayToMatch(java.lang.Object[] parameters)

      Description copied from class: `BaseMatcher`
      Converts the array representation of a pattern match to an immutable Match object.

    - #### arrayToMatchMutable

          public GenericPatternMatch arrayToMatchMutable(java.lang.Object[] parameters)

      Description copied from class: `BaseMatcher`
      Converts the array representation of a pattern match to a mutable Match object.

    - #### getSpecification

          public GenericQuerySpecification<? extends GenericPatternMatcher> getSpecification()

      Description copied from interface: `IncQueryMatcher`
      The pattern that will be matched.
      Specified by:
        `getSpecification` in interface `IncQueryMatcher<GenericPatternMatch>`
      Overrides:
        `getSpecification` in class `BaseMatcher<GenericPatternMatch>`