org.eclipse.viatra.cep.core.engine.compiler.util

## Class EquivalentStatesQuerySpecification

- java.lang.Object
- - org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification<Matcher>
  - - org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification<EquivalentStatesMatcher>
    - - org.eclipse.viatra.cep.core.engine.compiler.util.EquivalentStatesQuerySpecification

- All Implemented Interfaces:
    IQuerySpecification<EquivalentStatesMatcher>, PQueryHeader

      public final class EquivalentStatesQuerySpecification
      extends BaseGeneratedEMFQuerySpecification<EquivalentStatesMatcher>

  A pattern-specific query specification that can instantiate EquivalentStatesMatcher in a type-safe way.
  See Also:
    `EquivalentStatesMatcher`, `EquivalentStatesMatch`

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification

      `wrappedPQuery`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static EquivalentStatesQuerySpecification` | `instance()`
    `EquivalentStatesMatcher` | `instantiate()` 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.
    `protected EquivalentStatesMatcher` | `instantiate(ViatraQueryEngine engine)`
    `EquivalentStatesMatch` | `newEmptyMatch()` Returns an empty, mutable Match compatible with matchers of this query.
    `EquivalentStatesMatch` | `newMatch(java.lang.Object... parameters)` Returns a new (partial) Match object compatible with matchers of this query.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification

      `getPreferredScopeClass`

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

      `ensureInitializedInternal, ensureInitializedInternalSneaky, getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, getInternalQueryRepresentation, getMatcher, getParameterNames, getParameters, getPositionOfParameter, processInitializerError`

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

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

- - ### Method Detail

    - #### instance

          public static EquivalentStatesQuerySpecification instance()
                                                             throws ViatraQueryException

      Returns:
        the singleton instance of the query specification
      Throws:
        `ViatraQueryException` - if the pattern definition could not be loaded

    - #### instantiate

          protected EquivalentStatesMatcher instantiate(ViatraQueryEngine engine)
                                                 throws ViatraQueryException

      Specified by:
        `instantiate` in class `BaseQuerySpecification<EquivalentStatesMatcher>`
      Throws:
        `ViatraQueryException`

    - #### instantiate

          public EquivalentStatesMatcher instantiate()
                                              throws ViatraQueryException

      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<EquivalentStatesMatcher>`
      Overrides:
        `instantiate` in class `BaseQuerySpecification<EquivalentStatesMatcher>`
      Throws:
        `ViatraQueryException`

    - #### newEmptyMatch

          public EquivalentStatesMatch newEmptyMatch()

      Description copied from interface: `IQuerySpecification`
      Returns an empty, mutable Match compatible with matchers of this query. Fields of the mutable match can be filled to create a partial match, usable as matcher input. This can be used to call the matcher with a partial match even if the specific class of the matcher or the match is unknown.
      Returns:
        the empty match

    - #### newMatch

          public EquivalentStatesMatch newMatch(java.lang.Object... parameters)

      Description copied from interface: `IQuerySpecification`
      Returns a new (partial) Match object compatible with matchers of this query. This can be used e.g. to call the matcher with a partial match.

      The returned match will be immutable. Use `IQuerySpecification.newEmptyMatch()` to obtain a mutable match object.

      Parameters:
        `parameters` - the fixed value of pattern parameters, or null if not bound.
      Returns:
        the (partial) match object.