Package org.eclipse.viatra.query.patternlanguage.emf.specification

## Class XBaseEvaluator

- java.lang.Object
- - org.eclipse.viatra.query.patternlanguage.emf.specification.XBaseEvaluator

- All Implemented Interfaces:
    `IExpressionEvaluator`

      public class XBaseEvaluator
      extends java.lang.Object
      implements IExpressionEvaluator

  Evaluates an XBase XExpression inside Rete.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XBaseEvaluator​(org.eclipse.xtext.xbase.XExpression xExpression, Pattern pattern)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `evaluateExpression​(IValueProvider provider)` | The expression evaluator code
    `org.eclipse.xtext.xbase.XExpression` | `getExpression()` |
    `java.lang.Iterable<java.lang.String>` | `getInputParameterNames()` | All input parameter names should be reported correctly.
    `java.lang.String` | `getShortDescription()` | A textual description of the expression.

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

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

- - ### Constructor Detail

    - #### XBaseEvaluator

          public XBaseEvaluator​(org.eclipse.xtext.xbase.XExpression xExpression,
                                Pattern pattern)

      Parameters:
        `xExpression` - the expression to evaluate
        `pattern` -
      Since:
        2.0

  - ### Method Detail

    - #### getInputParameterNames

          public java.lang.Iterable<java.lang.String> getInputParameterNames()

      Description copied from interface: `IExpressionEvaluator`
      All input parameter names should be reported correctly.
      Specified by:
        `getInputParameterNames` in interface `IExpressionEvaluator`

    - #### getExpression

          public org.eclipse.xtext.xbase.XExpression getExpression()

    - #### evaluateExpression

          public java.lang.Object evaluateExpression​(IValueProvider provider)
                                              throws java.lang.Exception

      Description copied from interface: `IExpressionEvaluator`
      The expression evaluator code
      Specified by:
        `evaluateExpression` in interface `IExpressionEvaluator`
      Parameters:
        `provider` - the value provider is an engine-specific way of reading internal variable tuples to evaluate the expression with
      Returns:
        the result of the expression: in case of predicate evaluation the return value must be true or false; otherwise the result can be an arbitrary object. No null values should be returned.
      Throws:
        `java.lang.Exception`

    - #### getShortDescription

          public java.lang.String getShortDescription()

      Description copied from interface: `IExpressionEvaluator`
      A textual description of the expression. Used only for debug purposes, but must not be null.
      Specified by:
        `getShortDescription` in interface `IExpressionEvaluator`