org.eclipse.xtend.core.typing
Class XtendTypeProvider
java.lang.Object
org.eclipse.xtext.xbase.typing.AbstractTypeProvider
org.eclipse.xtext.xbase.typing.XbaseTypeProvider
org.eclipse.xtext.xbase.annotations.typing.XbaseWithAnnotationsTypeProvider
org.eclipse.xtend.core.typing.XtendTypeProvider
- All Implemented Interfaces:
- ITypeProvider
public class XtendTypeProvider
- extends XbaseWithAnnotationsTypeProvider
Type provider that is aware of Xtend specific expressions and the inferred JVM model.
Method Summary |
protected JvmTypeReference |
_expectedType(CreateExtensionInfo info,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
protected JvmTypeReference |
_expectedType(RichStringElseIf container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
protected JvmTypeReference |
_expectedType(RichStringForLoop expr,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
protected JvmTypeReference |
_expectedType(RichStringIf container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
protected JvmTypeReference |
_expectedType(XtendConstructor constructor,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
protected JvmTypeReference |
_expectedType(XtendFunction function,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
protected JvmTypeReference |
_type(RichStringForLoop richStringFor,
JvmTypeReference rawExpectation,
boolean rawType)
|
protected JvmTypeReference |
_type(RichStringIf richStringIf,
JvmTypeReference rawExpectation,
boolean rawType)
|
protected JvmTypeReference |
_type(RichString richString,
JvmTypeReference rawExpectation,
boolean rawType)
|
protected JvmTypeReference |
_type(RichStringLiteral stringLiteral,
JvmTypeReference rawExpectation,
boolean rawType)
|
protected JvmTypeReference |
_typeForIdentifiable(XtendClass clazz,
boolean rawType)
|
protected JvmTypeReference |
_typeForIdentifiable(XtendParameter param,
boolean rawType)
|
protected JvmTypeReference |
expectedType(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
JvmTypeReference |
getExpectedReturnType(XExpression expr,
boolean rawType)
Return the expected return type of the given expression. |
protected JvmTypeReference |
type(XExpression expression,
JvmTypeReference rawExpectation,
boolean rawType)
|
protected JvmTypeReference |
typeForIdentifiable(JvmIdentifiableElement identifiable,
boolean rawType)
|
Methods inherited from class org.eclipse.xtext.xbase.typing.XbaseTypeProvider |
_earlyExits, _earlyExits, _earlyExits, _earlyExits, _earlyExits, _earlyExits, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _expectedType, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _type, _typeForIdentifiable, _typeForIdentifiable, _typeForIdentifiable, _typeForIdentifiable, _typeForIdentifiable, _typeForIdentifiable, _typeForIdentifiable, _typeForIdentifiable, _typeForIdentifiable, findTypeGuardedXCasePartContainer, getArgumentTypes, getArgumentTypes, getCommonType, getExpectedVarArgType, getExpression, getFeatureCallTypeArgContext, getParam, getPrimitiveVoid, getReceiverType, getThrownExceptionForIdentifiable, getTypeArgumentContext, getTypeArgumentContext, getTypesFactory, handleCycleGetExpectedType, handleCycleGetTypeForIdentifiable, isFilteredFromCommonTypesList |
Methods inherited from class org.eclipse.xtext.xbase.typing.AbstractTypeProvider |
_earlyExits, _earlyExits, _earlyExits, _type, _typeForIdentifiable, checkIsSingelton, doGetType, getCommonReturnType, getConstructor, getConstructor, getContainingInfo, getDebugIndentation, getExpectedType, getExpectedType, getFeature, getFeature, getLogicalContainerProvider, getLogicalOrRealContainer, getLogicalOrRealContainer, getNearestTypeParameterDeclarator, getThrownExceptionTypes, getType, getType, getType, getTypeArgumentContextProvider, getTypeConformanceComputer, getTypeForIdentifiable, getTypeForIdentifiable, getTypeReferences, handleCyclicGetType, internalCollectEarlyExits, isDeclaratorOf, isResolved, isResolved |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XtendTypeProvider
public XtendTypeProvider()
typeForIdentifiable
protected JvmTypeReference typeForIdentifiable(JvmIdentifiableElement identifiable,
boolean rawType)
- Overrides:
typeForIdentifiable
in class XbaseTypeProvider
type
protected JvmTypeReference type(XExpression expression,
JvmTypeReference rawExpectation,
boolean rawType)
- Overrides:
type
in class XbaseWithAnnotationsTypeProvider
expectedType
protected JvmTypeReference expectedType(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
- Overrides:
expectedType
in class XbaseWithAnnotationsTypeProvider
_expectedType
protected JvmTypeReference _expectedType(XtendFunction function,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
_expectedType
protected JvmTypeReference _expectedType(XtendConstructor constructor,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
_expectedType
protected JvmTypeReference _expectedType(CreateExtensionInfo info,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
getExpectedReturnType
public JvmTypeReference getExpectedReturnType(XExpression expr,
boolean rawType)
- Description copied from interface:
ITypeProvider
- Return the expected return type of the given expression.
- Specified by:
getExpectedReturnType
in interface ITypeProvider
- Overrides:
getExpectedReturnType
in class XbaseTypeProvider
- Parameters:
expr
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.
- Returns:
- the expected return type of the given expression, if a correct, fully-linkable model is given.
Returns
null
if no special return type is expected
_type
protected JvmTypeReference _type(RichString richString,
JvmTypeReference rawExpectation,
boolean rawType)
_type
protected JvmTypeReference _type(RichStringLiteral stringLiteral,
JvmTypeReference rawExpectation,
boolean rawType)
_type
protected JvmTypeReference _type(RichStringIf richStringIf,
JvmTypeReference rawExpectation,
boolean rawType)
_type
protected JvmTypeReference _type(RichStringForLoop richStringFor,
JvmTypeReference rawExpectation,
boolean rawType)
_expectedType
protected JvmTypeReference _expectedType(RichStringIf container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
_expectedType
protected JvmTypeReference _expectedType(RichStringElseIf container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
_expectedType
protected JvmTypeReference _expectedType(RichStringForLoop expr,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
_typeForIdentifiable
protected JvmTypeReference _typeForIdentifiable(XtendParameter param,
boolean rawType)
_typeForIdentifiable
protected JvmTypeReference _typeForIdentifiable(XtendClass clazz,
boolean rawType)