org.eclipse.xtext.xbase.typing
Class XbaseTypeProvider

java.lang.Object
  extended by org.eclipse.xtext.xbase.typing.AbstractTypeProvider
      extended by org.eclipse.xtext.xbase.typing.XbaseTypeProvider
All Implemented Interfaces:
ITypeProvider
Direct Known Subclasses:
XbaseWithAnnotationsTypeProvider

public class XbaseTypeProvider
extends AbstractTypeProvider

Author:
Sven Efftinge, Sebastian Zarnekow

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.xbase.typing.AbstractTypeProvider
AbstractTypeProvider.EarlyExitAcceptor, AbstractTypeProvider.ImmutableLinkedItem<T>
 
Field Summary
 
Fields inherited from class org.eclipse.xtext.xbase.typing.AbstractTypeProvider
getExpectedType, getType, getTypeForIdentifiable
 
Constructor Summary
XbaseTypeProvider()
           
 
Method Summary
protected  void _earlyExits(XAbstractFeatureCall expr, AbstractTypeProvider.EarlyExitAcceptor acceptor)
           
protected  void _earlyExits(XClosure expr, AbstractTypeProvider.EarlyExitAcceptor a)
          Closures don't exit early and nested expressions have no impact on the container.
protected  void _earlyExits(XConstructorCall expr, AbstractTypeProvider.EarlyExitAcceptor acceptor)
           
protected  void _earlyExits(XReturnExpression expr, AbstractTypeProvider.EarlyExitAcceptor acceptor)
           
protected  void _earlyExits(XThrowExpression expr, AbstractTypeProvider.EarlyExitAcceptor acceptor)
           
protected  void _earlyExits(XTryCatchFinallyExpression expr, AbstractTypeProvider.EarlyExitAcceptor acceptor)
           
protected  JvmTypeReference _expectedType(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XAbstractFeatureCall featureCall, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XAbstractWhileExpression expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XAssignment assignment, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XBinaryOperation expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XBlockExpression expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XCasePart expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XCastedExpression expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XCatchClause expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XClosure closure, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XConstructorCall expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XForLoopExpression expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XIfExpression expr, 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(XSwitchExpression expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XThrowExpression expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XTryCatchFinallyExpression expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _expectedType(XVariableDeclaration expr, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  JvmTypeReference _type(XAbstractFeatureCall featureCall, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XAbstractWhileExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XBlockExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XBooleanLiteral object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XCastedExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XClosure object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XConstructorCall constructorCall, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XFeatureCall featureCall, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XForLoopExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XIfExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XInstanceOfExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XNullLiteral object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XNumberLiteral object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XReturnExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XStringLiteral object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XSwitchExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XThrowExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XTryCatchFinallyExpression object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XTypeLiteral object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _type(XVariableDeclaration object, JvmTypeReference rawExpectation, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(JvmConstructor constructor, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(JvmField field, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(JvmFormalParameter parameter, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(JvmGenericType thisOrSuper, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(JvmOperation operation, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(JvmType type, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XCasePart object, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XSwitchExpression object, boolean rawType)
           
protected  JvmTypeReference _typeForIdentifiable(XVariableDeclaration object, boolean rawType)
           
protected  JvmTypeReference expectedType(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
           
protected  XCasePart findTypeGuardedXCasePartContainer(org.eclipse.emf.ecore.EObject context, XFeatureCall call)
           
protected  JvmTypeReference[] getArgumentTypes(JvmExecutable executable, java.util.List<XExpression> actualArguments, boolean rawType)
           
protected  JvmTypeReference[] getArgumentTypes(XAbstractFeatureCall expr, boolean rawType)
           
protected  JvmTypeReference getCommonType(java.util.List<JvmTypeReference> types)
          Returns the common type of the given types.
 JvmTypeReference getExpectedReturnType(XExpression expr, boolean rawType)
          Return the expected return type of the given expression.
protected  JvmTypeReference getExpectedVarArgType(JvmExecutable feature, ITypeArgumentContext typeArgumentContext, boolean rawType, boolean forceComponentType)
           
protected  XExpression getExpression(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference reference, int index)
           
protected  ITypeArgumentContext getFeatureCallTypeArgContext(XAbstractFeatureCall expr, boolean rawType)
           
protected  JvmFormalParameter getParam(JvmExecutable executable, int i)
           
protected  JvmTypeReference getPrimitiveVoid(XExpression object)
           
protected  JvmTypeReference getReceiverType(XAbstractFeatureCall expr, boolean rawType)
           
 java.lang.Iterable<JvmTypeReference> getThrownExceptionForIdentifiable(JvmIdentifiableElement identifiable)
          returns the exception types, declared to be thrown by referencing / executing the passed JvmIdentifiableElement.
 ITypeArgumentContext getTypeArgumentContext(XAbstractFeatureCall featureCall, java.util.List<XExpression> actualArguments, com.google.inject.Provider<JvmTypeReference> receiverTypeProvider, JvmIdentifiableElement feature)
           
 ITypeArgumentContext getTypeArgumentContext(XConstructorCall constructorCall, JvmConstructor constructor)
           
protected  TypesFactory getTypesFactory()
           
protected  JvmTypeReference handleCycleGetExpectedType(XExpression expression, boolean rawType)
          Allows to handle cyclic resolution of expected types.
protected  JvmTypeReference handleCycleGetTypeForIdentifiable(JvmIdentifiableElement identifiableElement, boolean rawType)
          Allows to handle cyclic resolution of types.
protected  boolean isFilteredFromCommonTypesList(JvmTypeReference reference)
           
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.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
 

Constructor Detail

XbaseTypeProvider

public XbaseTypeProvider()
Method Detail

_expectedType

protected JvmTypeReference _expectedType(org.eclipse.emf.ecore.EObject obj,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Overrides:
_expectedType in class AbstractTypeProvider
Parameters:
obj - the container that owns the expression that may have a type expectation.
reference - the reference that can be used to obtain the expression with a type expectation.
index - the index if reference is a multi value feature.
rawType - true if we are only interested in the type parameter.

typeForIdentifiable

protected JvmTypeReference typeForIdentifiable(JvmIdentifiableElement identifiable,
                                               boolean rawType)
Overrides:
typeForIdentifiable in class AbstractTypeProvider

type

protected JvmTypeReference type(XExpression expression,
                                JvmTypeReference rawExpectation,
                                boolean rawType)
Overrides:
type in class AbstractTypeProvider

expectedType

protected JvmTypeReference expectedType(org.eclipse.emf.ecore.EObject container,
                                        org.eclipse.emf.ecore.EReference reference,
                                        int index,
                                        boolean rawType)
Overrides:
expectedType in class AbstractTypeProvider

_expectedType

protected JvmTypeReference _expectedType(XAssignment assignment,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)

getExpression

protected XExpression getExpression(org.eclipse.emf.ecore.EObject object,
                                    org.eclipse.emf.ecore.EReference reference,
                                    int index)

_expectedType

protected JvmTypeReference _expectedType(XAbstractFeatureCall featureCall,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)

_expectedType

protected JvmTypeReference _expectedType(XClosure closure,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index

handleCycleGetExpectedType

protected JvmTypeReference handleCycleGetExpectedType(XExpression expression,
                                                      boolean rawType)
Description copied from class: AbstractTypeProvider
Allows to handle cyclic resolution of expected types.

Overrides:
handleCycleGetExpectedType in class AbstractTypeProvider
Parameters:
expression - the expression that was asked reentrant for its expected type.
rawType - true if we are only interested in the raw type

getFeatureCallTypeArgContext

protected ITypeArgumentContext getFeatureCallTypeArgContext(XAbstractFeatureCall expr,
                                                            boolean rawType)

getArgumentTypes

protected JvmTypeReference[] getArgumentTypes(XAbstractFeatureCall expr,
                                              boolean rawType)

getArgumentTypes

protected JvmTypeReference[] getArgumentTypes(JvmExecutable executable,
                                              java.util.List<XExpression> actualArguments,
                                              boolean rawType)

getParam

protected JvmFormalParameter getParam(JvmExecutable executable,
                                      int i)

getReceiverType

protected JvmTypeReference getReceiverType(XAbstractFeatureCall expr,
                                           boolean rawType)

_expectedType

protected JvmTypeReference _expectedType(XBinaryOperation expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)

_expectedType

protected JvmTypeReference _expectedType(XVariableDeclaration expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XConstructorCall expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)

getExpectedVarArgType

protected JvmTypeReference getExpectedVarArgType(JvmExecutable feature,
                                                 ITypeArgumentContext typeArgumentContext,
                                                 boolean rawType,
                                                 boolean forceComponentType)
Parameters:
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XBlockExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)

_expectedType

protected JvmTypeReference _expectedType(XIfExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XForLoopExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
expr - the for loop expression whose expected child type shall be computed. May not be null.
reference - the feature that describes the child whose type is expected
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XAbstractWhileExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XTryCatchFinallyExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XCatchClause expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XCastedExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
expr - the casted expression that is the container of the child whose expected type should be computed. May not be null.
reference - the feature that describes the child whose type is expected
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XThrowExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
reference - the feature that describes the child whose type is expected
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XReturnExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XSwitchExpression expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_expectedType

protected JvmTypeReference _expectedType(XCasePart expr,
                                         org.eclipse.emf.ecore.EReference reference,
                                         int index,
                                         boolean rawType)
Parameters:
index - the feature index
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XIfExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)

getCommonType

protected JvmTypeReference getCommonType(java.util.List<JvmTypeReference> types)
Returns the common type of the given types. Filters for primitive voids and unresolved types prior to asking the TypeConformanceComputer.


isFilteredFromCommonTypesList

protected boolean isFilteredFromCommonTypesList(JvmTypeReference reference)

_type

protected JvmTypeReference _type(XSwitchExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)

_type

protected JvmTypeReference _type(XBlockExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)

_type

protected JvmTypeReference _type(XVariableDeclaration object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XConstructorCall constructorCall,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.

getTypeArgumentContext

public ITypeArgumentContext getTypeArgumentContext(XConstructorCall constructorCall,
                                                   JvmConstructor constructor)

_type

protected JvmTypeReference _type(XBooleanLiteral object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XNullLiteral object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XNumberLiteral object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XStringLiteral object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XClosure object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)

_type

protected JvmTypeReference _type(XCastedExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XForLoopExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XAbstractWhileExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XTypeLiteral object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XInstanceOfExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XThrowExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XReturnExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

getPrimitiveVoid

protected JvmTypeReference getPrimitiveVoid(XExpression object)

_type

protected JvmTypeReference _type(XTryCatchFinallyExpression object,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

_type

protected JvmTypeReference _type(XFeatureCall featureCall,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

findTypeGuardedXCasePartContainer

protected XCasePart findTypeGuardedXCasePartContainer(org.eclipse.emf.ecore.EObject context,
                                                      XFeatureCall call)

_type

protected JvmTypeReference _type(XAbstractFeatureCall featureCall,
                                 JvmTypeReference rawExpectation,
                                 boolean rawType)
Parameters:
rawExpectation - the expected raw type if set from the outside. May be null.
rawType - true if we are only interested in the raw type

getTypeArgumentContext

public ITypeArgumentContext getTypeArgumentContext(XAbstractFeatureCall featureCall,
                                                   java.util.List<XExpression> actualArguments,
                                                   com.google.inject.Provider<JvmTypeReference> receiverTypeProvider,
                                                   JvmIdentifiableElement feature)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(XSwitchExpression object,
                                                boolean rawType)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(XCasePart object,
                                                boolean rawType)
Parameters:
rawType - true if we are only interested in the raw type

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(XVariableDeclaration object,
                                                boolean rawType)

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(JvmFormalParameter parameter,
                                                boolean rawType)

handleCycleGetTypeForIdentifiable

protected JvmTypeReference handleCycleGetTypeForIdentifiable(JvmIdentifiableElement identifiableElement,
                                                             boolean rawType)
Description copied from class: AbstractTypeProvider
Allows to handle cyclic resolution of types.

Overrides:
handleCycleGetTypeForIdentifiable in class AbstractTypeProvider
Parameters:
identifiableElement - the element that was asked reentrant for its type.
rawType - true if we are only interested in the raw type

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(JvmGenericType thisOrSuper,
                                                boolean rawType)
Parameters:
rawType - true if we are only interested in the raw type

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(JvmConstructor constructor,
                                                boolean rawType)
Parameters:
rawType - true if we are only interested in the raw type

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(JvmField field,
                                                boolean rawType)
Parameters:
rawType - true if we are only interested in the raw type

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(JvmOperation operation,
                                                boolean rawType)
Parameters:
rawType - true if we are only interested in the raw type

_typeForIdentifiable

protected JvmTypeReference _typeForIdentifiable(JvmType type,
                                                boolean rawType)
Parameters:
rawType - true if we are only interested in the raw type

_earlyExits

protected void _earlyExits(XClosure expr,
                           AbstractTypeProvider.EarlyExitAcceptor a)
Closures don't exit early and nested expressions have no impact on the container.

Parameters:
expr - the closure.
a - the collector of the early exit result.

_earlyExits

protected void _earlyExits(XReturnExpression expr,
                           AbstractTypeProvider.EarlyExitAcceptor acceptor)

_earlyExits

protected void _earlyExits(XThrowExpression expr,
                           AbstractTypeProvider.EarlyExitAcceptor acceptor)

_earlyExits

protected void _earlyExits(XConstructorCall expr,
                           AbstractTypeProvider.EarlyExitAcceptor acceptor)

_earlyExits

protected void _earlyExits(XAbstractFeatureCall expr,
                           AbstractTypeProvider.EarlyExitAcceptor acceptor)

_earlyExits

protected void _earlyExits(XTryCatchFinallyExpression expr,
                           AbstractTypeProvider.EarlyExitAcceptor acceptor)

getTypesFactory

protected TypesFactory getTypesFactory()

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.

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.

getExpectedReturnType

public JvmTypeReference getExpectedReturnType(XExpression expr,
                                              boolean rawType)
Description copied from interface: ITypeProvider
Return the expected return type of the given expression.

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