org.eclipse.viatra.query.patternlanguage.typing

## Interface ITypeInferrer

- All Known Implementing Classes:
    AbstractTypeInferrer, EMFTypeInferrer, ITypeInferrer.NullTypeInferrer

      public interface ITypeInferrer

  The type inferrer calculates the types of variables and variable references of the pattern model.
  No Implement:

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `ITypeInferrer.NullTypeInferrer` An empty implementation of `ITypeInferrer` that can be used by the abstract pattern language module.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<IInputKey>` | `getAllPossibleTypes(Expression ex)` Returns a collection of possible inferred types.
    `IInputKey` | `getDeclaredType(Expression ex)` Returns the declared type of a variable
    `IInputKey` | `getDeclaredType(Variable ex)`
    `IInputKey` | `getInferredType(Expression ex)` Returns the inferred type of a variable
    `IInputKey` | `getInferredVariableType(Variable ex)` Deprecated.
    `org.eclipse.xtext.common.types.JvmTypeReference` | `getJvmType(Expression ex, org.eclipse.emf.ecore.EObject context)` Creates a Jvm Type Reference for a selected expression.
    `IInputKey` | `getType(Expression ex)` Returns the type of a variable.
    `org.eclipse.xtext.common.types.JvmTypeReference` | `getVariableJvmType(Variable ex, org.eclipse.emf.ecore.EObject context)` Deprecated. use `getJvmType(Expression, EObject)` instead
    `IInputKey` | `getVariableReferenceType(VariableReference ref)` Deprecated. use `getType(Expression)` instead
    `IInputKey` | `getVariableType(Variable var)` Deprecated. use `getType(Expression)` instead

- - ### Method Detail

    - #### getDeclaredType

          IInputKey getDeclaredType(Expression ex)

      Returns the declared type of a variable
      Parameters:
        `ex` -
      Returns:
        the declared type of the variable, or null if no type declaration is available
      Since:
        1.3

    - #### getDeclaredType

          IInputKey getDeclaredType(Variable ex)

    - #### getInferredType

          IInputKey getInferredType(Expression ex)

      Returns the inferred type of a variable
      Parameters:
        `ex` -
      Since:
        1.3

    - #### getInferredVariableType

          @Deprecated
          IInputKey getInferredVariableType(Variable ex)

      Deprecated.

    - #### getAllPossibleTypes

          java.util.Set<IInputKey> getAllPossibleTypes(Expression ex)

      Returns a collection of possible inferred types. Used for validating inputs; not recommended to use when processing the patterns
      Since:
        1.3

    - #### getType

          IInputKey getType(Expression ex)

      Returns the type of a variable.
      Returns:
        if the variable has a declared type, it is returned; otherwise the inferred type is calculated.
      Since:
        1.3

    - #### getVariableReferenceType

          @Deprecated
          IInputKey getVariableReferenceType(VariableReference ref)

      Deprecated. use `getType(Expression)` instead

    - #### getVariableType

          @Deprecated
          IInputKey getVariableType(Variable var)

      Deprecated. use `getType(Expression)` instead

    - #### getJvmType

          org.eclipse.xtext.common.types.JvmTypeReference getJvmType(Expression ex,
                                                                     org.eclipse.emf.ecore.EObject context)

      Creates a Jvm Type Reference for a selected expression. Useful during Jvm Model Inference
      Parameters:
        `ex` -
        `context` -
      Since:
        1.3

    - #### getVariableJvmType

          @Deprecated
          org.eclipse.xtext.common.types.JvmTypeReference getVariableJvmType(Variable ex,
                                                                                         org.eclipse.emf.ecore.EObject context)

      Deprecated. use `getJvmType(Expression, EObject)` instead