Interface ITypeInferrer
-
- All Known Implementing Classes:
AbstractTypeInferrer
,EMFTypeInferrer
public interface ITypeInferrer
The type inferrer calculates the types of variables and variable references of the pattern model.- Since:
- 2.0
- No Implement:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 variableIInputKey
getDeclaredType(Variable ex)
IInputKey
getInferredType(Expression ex)
Returns the inferred type of a variableorg.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.
-
-
-
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
-
getInferredType
IInputKey getInferredType(Expression ex)
Returns the inferred type of a variable- Parameters:
ex
-- Since:
- 1.3
-
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
-
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
-
-