org.eclipse.incquery.patternlanguage.emf.specification.builder

## Interface PatternModelAcceptor<Result>

- Type Parameters:
    `Result` - the type of the result
  All Known Implementing Classes:
    EPMToPBody

      public interface PatternModelAcceptor<Result>

  Defines the mapping of `PatternModel` elements during the transformation of a `PatternBody`. It has the responsibility to maintain an internal representation of the `Variable`s both present in the `PatternBody` and additional `Variable`s needed for the `Constraint`s in the `PatternBody`. The methods use variable names which identify these internal variables.

  WARNING! Implementations of this interface are typically stateful, so don't reuse instances of them!

  Since:
    1.1

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acceptBinaryTransitiveClosure(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)` Accepts a `BinaryTransitiveClosure`.
    `void` | `acceptConstraint(Constraint constraint)` Accepts a general `Constraint`.
    `void` | `acceptEquality(java.lang.String leftOperandVariableName, java.lang.String rightOperandVariableName)` Accepts an `Equality`.
    `void` | `acceptExportedParameters(java.util.List<Variable> parameters)` Accepts the given parameters as exported parameter constraints.
    `void` | `acceptExpressionEvaluation(org.eclipse.xtext.xbase.XExpression expression, java.lang.String outputVariableName)` Accepts an `ExpressionEvaluation`.
    `void` | `acceptInequality(java.lang.String leftOperandVariableName, java.lang.String rightOperandVariableName)` Accepts an `Inequality`.
    `void` | `acceptNegativePatternCall(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)` Accepts a `NegativePatternCall`.
    `void` | `acceptPatternMatchCounter(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern, java.lang.String resultVariableName)` Accepts a `PatternMatchCounter`.
    `void` | `acceptPositivePatternCall(java.util.List<java.lang.String> argumentVariableNames, Pattern calledPattern)` Accepts a `PositivePatternCall`.
    `void` | `acceptTypeConstraint(java.util.List<java.lang.String> variableNames, IInputKey inputKey)` Accepts a `TypeConstraint`.
    `java.lang.String` | `acceptVariable(Variable variable)` Registers a `Variable` and returns the name of the internal variable.
    `java.lang.String` | `createConstantVariable(java.lang.Object value)` Creates an internal virtual variable, a constant constraint which binds it to the given value, and returns its name.
    `java.lang.String` | `createVirtualVariable()` Creates an internal virtual variable and returns its name.
    `Result` | `getResult()` Returns the constructed object after traversing a `PatternBody`.

- - ### Method Detail

    - #### getResult

          Result getResult()

      Returns the constructed object after traversing a `PatternBody`.

    - #### acceptVariable

          java.lang.String acceptVariable(Variable variable)

      Registers a `Variable` and returns the name of the internal variable.

    - #### createVirtualVariable

          java.lang.String createVirtualVariable()

      Creates an internal virtual variable and returns its name.

    - #### createConstantVariable

          java.lang.String createConstantVariable(java.lang.Object value)

      Creates an internal virtual variable, a constant constraint which binds it to the given value, and returns its name.

    - #### acceptExportedParameters

          void acceptExportedParameters(java.util.List<Variable> parameters)

      Accepts the given parameters as exported parameter constraints.

    - #### acceptConstraint

          void acceptConstraint(Constraint constraint)

      Accepts a general `Constraint`. This is called for every `Constraint` before the acceptor method depending on the actual runtime type of the `Constraint`.

    - #### acceptTypeConstraint

          void acceptTypeConstraint(java.util.List<java.lang.String> variableNames,
                                    IInputKey inputKey)

      Accepts a `TypeConstraint`.

    - #### acceptPositivePatternCall

          void acceptPositivePatternCall(java.util.List<java.lang.String> argumentVariableNames,
                                         Pattern calledPattern)

      Accepts a `PositivePatternCall`.

    - #### acceptNegativePatternCall

          void acceptNegativePatternCall(java.util.List<java.lang.String> argumentVariableNames,
                                         Pattern calledPattern)

      Accepts a `NegativePatternCall`.

    - #### acceptBinaryTransitiveClosure

          void acceptBinaryTransitiveClosure(java.util.List<java.lang.String> argumentVariableNames,
                                             Pattern calledPattern)

      Accepts a `BinaryTransitiveClosure`.

    - #### acceptEquality

          void acceptEquality(java.lang.String leftOperandVariableName,
                              java.lang.String rightOperandVariableName)

      Accepts an `Equality`.

    - #### acceptInequality

          void acceptInequality(java.lang.String leftOperandVariableName,
                                java.lang.String rightOperandVariableName)

      Accepts an `Inequality`.

    - #### acceptExpressionEvaluation

          void acceptExpressionEvaluation(org.eclipse.xtext.xbase.XExpression expression,
                                          java.lang.String outputVariableName)
                                   throws SpecificationBuilderException

      Accepts an `ExpressionEvaluation`.
      Throws:
        `SpecificationBuilderException`

    - #### acceptPatternMatchCounter

          void acceptPatternMatchCounter(java.util.List<java.lang.String> argumentVariableNames,
                                         Pattern calledPattern,
                                         java.lang.String resultVariableName)

      Accepts a `PatternMatchCounter`.