org.eclipse.xtext.xtend2.typing
Class Xtend2TypeProvider

java.lang.Object
  extended by org.eclipse.xtext.xbase.typing.AbstractTypeProvider
      extended by org.eclipse.xtext.xbase.typing.XbaseTypeProvider
          extended by org.eclipse.xtext.xbase.annotations.typing.XbaseWithAnnotationsTypeProvider
              extended by org.eclipse.xtext.xtend2.typing.Xtend2TypeProvider
All Implemented Interfaces:
ITypeProvider

public class Xtend2TypeProvider
extends XbaseWithAnnotationsTypeProvider

Type provider that is aware of Xtend specific expressions and the inferred JVM model.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.xbase.typing.AbstractTypeProvider
AbstractTypeProvider.ComputationData<T extends org.eclipse.emf.ecore.EObject>, AbstractTypeProvider.EarlyExitAcceptor, AbstractTypeProvider.ImmutableLinkedItem
 
Field Summary
 
Fields inherited from class org.eclipse.xtext.xbase.typing.AbstractTypeProvider
getExpectedType, getType, getTypeForIdentifiable
 
Constructor Summary
Xtend2TypeProvider()
           
 
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(XReturnExpression expr, 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(RichString richString, boolean rawType)
           
protected  JvmTypeReference _type(RichStringForLoop richStringFor, boolean rawType)
           
protected  JvmTypeReference _type(RichStringIf richStringIf, boolean rawType)
           
protected  JvmTypeReference _type(RichStringLiteral stringLiteral, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(CreateExtensionInfo info, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(JvmGenericType type, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XtendClass clazz, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XtendClassSuperCallReferable referable, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XtendField dependency, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XtendFunction func, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XtendParameter param, boolean rawType)
           
protected  JvmTypeReference getDeclaredOrOverriddenReturnType(XtendFunction func)
           
 java.lang.Iterable<JvmTypeReference> getThrownExceptionForIdentifiable(JvmIdentifiableElement identifiable)
          returns the exception types, declared to be thrown by referencing / executing the passed JvmIdentifiableElement.
protected  java.lang.Iterable<JvmTypeReference> getThrownExceptions(XtendFunction xtendFunction)
           
 
Methods inherited from class org.eclipse.xtext.xbase.annotations.typing.XbaseWithAnnotationsTypeProvider
_expectedType, _expectedType, _expectedType, _expectedType, _type, _type, _type
 
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, _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, convertIfNeccessary, getArgumentTypes, getArgumentTypes, getCommonType, getExpectedVarArgType, getExpression, getFeatureCallTypeArgContext, getParam, getPrimitiveVoid, getReceiverType, getTypesFactory, handleCycleGetExpectedType, handleCycleGetTypeForIdentifiable, isFilteredFromCommonTypesList
 
Methods inherited from class org.eclipse.xtext.xbase.typing.AbstractTypeProvider
_earlyExits, _earlyExits, _earlyExits, _expectedType, _type, _typeForIdentifiable, checkIsSingelton, doGetType, getCommonReturnType, getContainingInfo, getDebugIndentation, getExpectedType, getExpectedType, getNearestTypeParameterDeclarator, getThrownExceptionTypes, getType, getType, getTypeArgumentContextProvider, getTypeConformanceComputer, getTypeForIdentifiable, getTypeForIdentifiable, getTypeReferences, handleCyclicGetType, internalCollectEarlyExits, isDeclaratorOf, isResolved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xtend2TypeProvider

public Xtend2TypeProvider()
Method Detail

_expectedType

protected JvmTypeReference _expectedType(XtendFunction function,
                                         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)

_expectedType

protected JvmTypeReference _expectedType(XReturnExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Overrides:
_expectedType in class XbaseTypeProvider

_type

protected JvmTypeReference _type(RichString richString,
                                 boolean rawType)

_type

protected JvmTypeReference _type(RichStringLiteral stringLiteral,
                                 boolean rawType)

_type

protected JvmTypeReference _type(RichStringIf richStringIf,
                                 boolean rawType)

_type

protected JvmTypeReference _type(RichStringForLoop richStringFor,
                                 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)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(XtendClassSuperCallReferable referable,
                                                boolean rawType)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(CreateExtensionInfo info,
                                                boolean rawType)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(XtendFunction func,
                                                boolean rawType)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(XtendField dependency,
                                                boolean rawType)

getDeclaredOrOverriddenReturnType

protected JvmTypeReference getDeclaredOrOverriddenReturnType(XtendFunction func)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(JvmGenericType type,
                                                boolean rawType)

getThrownExceptionForIdentifiable

public java.lang.Iterable<JvmTypeReference> getThrownExceptionForIdentifiable(JvmIdentifiableElement identifiable)
Description copied from interface: ITypeProvider
returns the exception types, declared to be thrown by referencing / executing the passed JvmIdentifiableElement. This includes explicitly declared RuntimeExceptions as well.

Specified by:
getThrownExceptionForIdentifiable in interface ITypeProvider
Overrides:
getThrownExceptionForIdentifiable in class XbaseTypeProvider
Parameters:
identifiable - May not be null.
Returns:
the iterable of fully-resolved exception types, if a correct, fully-linkable model is given. null indicates a problem during computation, an empty iterable means no thrown exceptions were found.

getThrownExceptions

protected java.lang.Iterable<JvmTypeReference> getThrownExceptions(XtendFunction xtendFunction)