org.eclipse.xtext.common.types.util
Class TypeArgumentContext

java.lang.Object
  extended by org.eclipse.xtext.common.types.util.TypeArgumentContext

public class TypeArgumentContext
extends java.lang.Object

Author:
Sven Efftinge - Initial contribution and API, Sebastian Zarnekow

Constructor Summary
TypeArgumentContext(java.util.Map<JvmTypeParameter,TypeArgumentContextProvider.ResolveInfo> context, IJvmTypeProvider.Factory typeProviderFactory, TypeReferences typeReferences)
           
 
Method Summary
protected  JvmTypeReference doGetResolvedCopy(JvmTypeReference element)
           
protected  JvmTypeReference doGetResolvedCopy(JvmTypeReference element, java.util.Set<JvmType> resolving, java.util.Map<JvmType,JvmTypeReference> unresolved)
           
 JvmTypeReference getBoundArgument(JvmTypeParameter param)
           
protected  java.util.Map<JvmTypeParameter,TypeArgumentContextProvider.ResolveInfo> getContextMap()
           
 JvmTypeReference getLowerBound(JvmTypeReference element)
          Resolve the reference for a contravariant location, i.e. returns the lower bound.
protected  org.eclipse.emf.ecore.resource.ResourceSet getResourceSet(org.eclipse.emf.common.notify.Notifier context2)
           
 JvmTypeReference getUpperBound(JvmTypeReference element, org.eclipse.emf.common.notify.Notifier context)
          Resolve the reference for a covariant location, i.e. returns the upper bound.
protected  void removeObjectLowerBound(JvmTypeReference copy)
           
 JvmTypeReference resolve(JvmTypeReference element)
          Resolves and returns the reference
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeArgumentContext

public TypeArgumentContext(java.util.Map<JvmTypeParameter,TypeArgumentContextProvider.ResolveInfo> context,
                           IJvmTypeProvider.Factory typeProviderFactory,
                           TypeReferences typeReferences)
Method Detail

getBoundArgument

public JvmTypeReference getBoundArgument(JvmTypeParameter param)

getLowerBound

public JvmTypeReference getLowerBound(JvmTypeReference element)
Resolve the reference for a contravariant location, i.e. returns the lower bound.

Returns:
the lower bound of a reference or null if there is no lower bound.

removeObjectLowerBound

protected void removeObjectLowerBound(JvmTypeReference copy)

getUpperBound

public JvmTypeReference getUpperBound(JvmTypeReference element,
                                      org.eclipse.emf.common.notify.Notifier context)
Resolve the reference for a covariant location, i.e. returns the upper bound.

Returns:
the upper bound of a reference.

getResourceSet

protected org.eclipse.emf.ecore.resource.ResourceSet getResourceSet(org.eclipse.emf.common.notify.Notifier context2)

resolve

public JvmTypeReference resolve(JvmTypeReference element)
Resolves and returns the reference

Returns:
the resolved reference.

doGetResolvedCopy

protected JvmTypeReference doGetResolvedCopy(JvmTypeReference element)

doGetResolvedCopy

protected JvmTypeReference doGetResolvedCopy(JvmTypeReference element,
                                             java.util.Set<JvmType> resolving,
                                             java.util.Map<JvmType,JvmTypeReference> unresolved)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getContextMap

protected java.util.Map<JvmTypeParameter,TypeArgumentContextProvider.ResolveInfo> getContextMap()