Class AbstractTypeInferrer
- java.lang.Object
-
- org.eclipse.viatra.query.patternlanguage.emf.types.AbstractTypeInferrer
-
- All Implemented Interfaces:
ITypeInferrer
- Direct Known Subclasses:
EMFTypeInferrer
public abstract class AbstractTypeInferrer extends java.lang.Object implements ITypeInferrer
- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description AbstractTypeInferrer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IInputKey
getDeclaredType(Expression ex)
Returns the declared type of a variableIInputKey
getDeclaredType(Variable ex)
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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.viatra.query.patternlanguage.emf.types.ITypeInferrer
getAllPossibleTypes, getInferredType
-
-
-
-
Method Detail
-
getType
public IInputKey getType(Expression ex)
Description copied from interface:ITypeInferrer
Returns the type of a variable.- Specified by:
getType
in interfaceITypeInferrer
- Returns:
- if the variable has a declared type, it is returned; otherwise the inferred type is calculated.
- Since:
- 1.3
-
getDeclaredType
public IInputKey getDeclaredType(Expression ex)
Description copied from interface:ITypeInferrer
Returns the declared type of a variable- Specified by:
getDeclaredType
in interfaceITypeInferrer
- Returns:
- the declared type of the variable, or null if no type declaration is available
- Since:
- 1.3
-
getJvmType
public org.eclipse.xtext.common.types.JvmTypeReference getJvmType(Expression ex, org.eclipse.emf.ecore.EObject context)
Description copied from interface:ITypeInferrer
Creates a Jvm Type Reference for a selected expression. Useful during Jvm Model Inference- Specified by:
getJvmType
in interfaceITypeInferrer
- Since:
- 1.3
-
getDeclaredType
public IInputKey getDeclaredType(Variable ex)
- Specified by:
getDeclaredType
in interfaceITypeInferrer
-
-