org.eclipse.incquery.runtime.extensibility

## Class QuerySpecificationRegistry

- java.lang.Object
- - org.eclipse.incquery.runtime.extensibility.QuerySpecificationRegistry

-     public final class QuerySpecificationRegistry
      extends java.lang.Object

  Registry for generated query specifications contributed via the plug-in mechanism. Allows accessing query specification instances based on the Pattern object or the fully qualified name of the pattern.
  Author:
    Abel Hegedus

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Set<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>>` | `getContributedQuerySpecifications()`
    `static java.util.Set<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>>` | `getPatternGroup(java.lang.String packageFQN)` Returns the set of query specifications in a given package.
    `static java.util.Set<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>>` | `getPatternSubTree(java.lang.String packageFQN)` Returns the set of query specifications in a given package.
    `static IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>` | `getQuerySpecification(java.lang.String patternFQN)`
    `static void` | `registerQuerySpecification(IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification)` Puts the specification in the registry, unless it already contains a specification for the given pattern FQN
    `static void` | `unregisterQuerySpecification(java.lang.String patternFQN)` Removes the query specification from the registry which belongs to the given fully qualified pattern name.

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

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

- - ### Method Detail

    - #### registerQuerySpecification

          public static void registerQuerySpecification(IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification)

      Puts the specification in the registry, unless it already contains a specification for the given pattern FQN
      Parameters:
        `specification` -

    - #### unregisterQuerySpecification

          public static void unregisterQuerySpecification(java.lang.String patternFQN)

      Removes the query specification from the registry which belongs to the given fully qualified pattern name.
      Parameters:
        `patternFQN` - the fully qualified name of the pattern

    - #### getContributedQuerySpecifications

          public static java.util.Set<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>> getContributedQuerySpecifications()

      Returns:
        a copy of the set of contributed query specifications

    - #### getQuerySpecification

          public static IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> getQuerySpecification(java.lang.String patternFQN)

      Parameters:
        `patternFQN` - the fully qualified name of a registered generated pattern
      Returns:
        the generated query specification of the pattern with the given fully qualified name, if it is registered, or null if there is no such generated pattern

    - #### getPatternGroup

          public static java.util.Set<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>> getPatternGroup(java.lang.String packageFQN)

      Returns the set of query specifications in a given package. Only query specifications with the exact package fully qualified name are returned.
      Parameters:
        `packageFQN` - the fully qualified name of the package
      Returns:
        the set of query specifications inside the given package, empty set otherwise.

    - #### getPatternSubTree

          public static java.util.Set<IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>>> getPatternSubTree(java.lang.String packageFQN)

      Returns the set of query specifications in a given package. query specifications with package names starting with the given package are returned.
      Parameters:
        `packageFQN` - the fully qualified name of the package
      Returns:
        the set of query specifications in the given package subtree, empty set otherwise.