org.eclipse.xtext.xtend2.typing
Class XtendTypeArgumentContextProvider

java.lang.Object
  extended by org.eclipse.xtext.common.types.util.TypeArgumentContextProvider
      extended by org.eclipse.xtext.xtend2.typing.XtendTypeArgumentContextProvider

public class XtendTypeArgumentContextProvider
extends TypeArgumentContextProvider

Xtend specific extension to the TypeArgumentContextProvider that is aware of the inferred jvm model.

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.common.types.util.TypeArgumentContextProvider
TypeArgumentContextProvider.ResolveInfo
 
Constructor Summary
XtendTypeArgumentContextProvider()
           
 
Method Summary
 TypeArgumentContext getExplicitMethodInvocationContext(JvmTypeParameterDeclarator parameterDeclarator, JvmTypeReference receiverType, java.util.List<JvmTypeReference> typeArguments)
          Creates a type argument context explicitly declared type arguments.
 
Methods inherited from class org.eclipse.xtext.common.types.util.TypeArgumentContextProvider
computeVarArgTypeInformation, containsEntry, get, getBetterMatch, getInferredMethodInvocationContext, getNullContext, getReceiverContext, getReceiverContext, getReferenceTypeParameter, injectArgumentTypeContext, injectArgumentTypeContext, injectExpectedTypeContext, injectExpectedTypeContext, injectReceiverContext, internalComputeContext, internalFindBestMatches, isResolved, resolve, resolve, resolveInferredMethodTypeArgContext, resolveInferredMethodTypeArgContext, resolveInferredTypeArgContext, resolveReceiver, resolveTypeParametersReferencedInTypeParameters, setConformanceComputer, setTypeProviderFactory, setTypeReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtendTypeArgumentContextProvider

public XtendTypeArgumentContextProvider()
Method Detail

getExplicitMethodInvocationContext

public TypeArgumentContext getExplicitMethodInvocationContext(JvmTypeParameterDeclarator parameterDeclarator,
                                                              JvmTypeReference receiverType,
                                                              java.util.List<JvmTypeReference> typeArguments)

Creates a type argument context explicitly declared type arguments.

This implementation uses the type parameters that are declared in the original method instead of the inferred declarator to match arguments and type parameters.

This is due to the fact that the created TypeArgumentContext considers the identity of the type parameters.

Overrides:
getExplicitMethodInvocationContext in class TypeArgumentContextProvider
Parameters:
parameterDeclarator - the declarator whose parameters should be matched with the arguments
receiverType - the resolved type of the message receiver
typeArguments - the explicit type arguments of the sent message
Returns:
the type argument context. Is never null.