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

## Class EPMToPBody

- java.lang.Object
- - org.eclipse.incquery.patternlanguage.emf.specification.builder.EPMToPBody

- All Implemented Interfaces:
    PatternModelAcceptor<PBody>

      public class EPMToPBody
      extends java.lang.Object
      implements PatternModelAcceptor<PBody>

  `PatternModelAcceptor` implementation that constructs a `PBody`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPMToPBody(Pattern pattern, PQuery query, NameToSpecificationMap patternMap)`

  - ### Method Summary

    All Methods Instance Methods Concrete 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.
    `PBody` | `getResult()` Returns the constructed object after traversing a `PatternBody`.

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

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

- - ### Constructor Detail

    - #### EPMToPBody

          public EPMToPBody(Pattern pattern,
                            PQuery query,
                            NameToSpecificationMap patternMap)

  - ### Method Detail

    - #### getResult

          public PBody getResult()

      Description copied from interface: `PatternModelAcceptor`
      Returns the constructed object after traversing a `PatternBody`.
      Specified by:
        `getResult` in interface `PatternModelAcceptor<PBody>`

    - #### acceptVariable

          public java.lang.String acceptVariable(Variable variable)

      Description copied from interface: `PatternModelAcceptor`
      Registers a `Variable` and returns the name of the internal variable.
      Specified by:
        `acceptVariable` in interface `PatternModelAcceptor<PBody>`

    - #### createVirtualVariable

          public java.lang.String createVirtualVariable()

      Description copied from interface: `PatternModelAcceptor`
      Creates an internal virtual variable and returns its name.
      Specified by:
        `createVirtualVariable` in interface `PatternModelAcceptor<PBody>`

    - #### createConstantVariable

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

      Description copied from interface: `PatternModelAcceptor`
      Creates an internal virtual variable, a constant constraint which binds it to the given value, and returns its name.
      Specified by:
        `createConstantVariable` in interface `PatternModelAcceptor<PBody>`

    - #### acceptExportedParameters

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts the given parameters as exported parameter constraints.
      Specified by:
        `acceptExportedParameters` in interface `PatternModelAcceptor<PBody>`

    - #### acceptConstraint

          public void acceptConstraint(Constraint constraint)

      Description copied from interface: `PatternModelAcceptor`
      Accepts a general `Constraint`. This is called for every `Constraint` before the acceptor method depending on the actual runtime type of the `Constraint`.
      Specified by:
        `acceptConstraint` in interface `PatternModelAcceptor<PBody>`

    - #### acceptTypeConstraint

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts a `TypeConstraint`.
      Specified by:
        `acceptTypeConstraint` in interface `PatternModelAcceptor<PBody>`

    - #### acceptPositivePatternCall

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts a `PositivePatternCall`.
      Specified by:
        `acceptPositivePatternCall` in interface `PatternModelAcceptor<PBody>`

    - #### acceptNegativePatternCall

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts a `NegativePatternCall`.
      Specified by:
        `acceptNegativePatternCall` in interface `PatternModelAcceptor<PBody>`

    - #### acceptBinaryTransitiveClosure

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts a `BinaryTransitiveClosure`.
      Specified by:
        `acceptBinaryTransitiveClosure` in interface `PatternModelAcceptor<PBody>`

    - #### acceptEquality

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts an `Equality`.
      Specified by:
        `acceptEquality` in interface `PatternModelAcceptor<PBody>`

    - #### acceptInequality

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts an `Inequality`.
      Specified by:
        `acceptInequality` in interface `PatternModelAcceptor<PBody>`

    - #### acceptExpressionEvaluation

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts an `ExpressionEvaluation`.
      Specified by:
        `acceptExpressionEvaluation` in interface `PatternModelAcceptor<PBody>`
      Throws:
        `SpecificationBuilderException`

    - #### acceptPatternMatchCounter

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

      Description copied from interface: `PatternModelAcceptor`
      Accepts a `PatternMatchCounter`.
      Specified by:
        `acceptPatternMatchCounter` in interface `PatternModelAcceptor<PBody>`