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

java.lang.Object
  extended by org.eclipse.xtext.common.types.util.TypeArgumentContextProvider
      extended by org.eclipse.xtext.common.types.util.LoggingTypeArgumentDecorator
All Implemented Interfaces:
ITypeArgumentContext, TypeArgumentContextProvider.IInitializableTypeArgumentContext, TypeArgumentContextProvider.Request

public class LoggingTypeArgumentDecorator
extends TypeArgumentContextProvider
implements TypeArgumentContextProvider.IInitializableTypeArgumentContext, TypeArgumentContextProvider.Request

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.common.types.util.TypeArgumentContextProvider
TypeArgumentContextProvider.AbstractRequest, TypeArgumentContextProvider.IInitializableTypeArgumentContext, TypeArgumentContextProvider.PrimitiveAwareMap, TypeArgumentContextProvider.ReceiverRequest, TypeArgumentContextProvider.Request, TypeArgumentContextProvider.ResolveInfo, TypeArgumentContextProvider.ResolveInfoKind
 
Constructor Summary
LoggingTypeArgumentDecorator(TypeArgumentContextProvider.IInitializableTypeArgumentContext contextDelegate)
           
 
Method Summary
protected  void dedent()
           
 java.util.List<JvmTypeReference> getArgumentTypes()
           
 JvmTypeReference getBoundArgument(JvmTypeParameter parameter)
           
protected  ITypeArgumentContext getDeclaredBoundsContext(JvmExecutable feature)
           
 JvmTypeReference getDeclaredType()
           
 JvmTypeReference getExpectedType()
           
protected  ITypeArgumentContext getExpectedTypeContext(JvmTypeReference declaredType, JvmTypeReference expectedType)
           
protected  ITypeArgumentContext getExplicitArgumentContext(JvmExecutable executable, java.util.List<JvmTypeReference> explicitTypeArguments)
           
 java.util.List<JvmTypeReference> getExplicitTypeArgument()
           
 JvmFeature getFeature()
           
protected  java.lang.String getIdentifier(JvmIdentifiableElement identifiable)
           
 JvmTypeReference getLowerBound(JvmTypeReference reference)
           
 JvmTypeParameterDeclarator getNearestDeclarator()
           
protected  ITypeArgumentContext getParameterContext(JvmExecutable executable, java.util.List<JvmTypeReference> argumentTypes)
           
protected  TypeArgumentContext getReceiverContext(JvmTypeReference receiverType)
           
 JvmTypeReference getReceiverType()
           
 JvmTypeReference getUpperBound(JvmTypeReference reference, org.eclipse.emf.common.notify.Notifier context)
           
protected  void indent()
           
 void initialize(TypeArgumentContextProvider.Request request, TypeArgumentContextProvider contextProvider)
           
static boolean isDebugEnabled()
           
 boolean isRawTypeContext()
           
 JvmTypeReference resolve(JvmTypeReference reference)
           
 
Methods inherited from class org.eclipse.xtext.common.types.util.TypeArgumentContextProvider
createMapWithTweakedToString, createTemporaryMap, createTemporaryMultimap, getTypeArgumentContext, getWithObjectUpperBoundIfNecessary, isRecursive, normalizedCopy, normalizedCopy, resolveAgainstActualType, wildcardAwareGetReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.xtext.common.types.util.TypeArgumentContextProvider.Request
toString
 

Constructor Detail

LoggingTypeArgumentDecorator

public LoggingTypeArgumentDecorator(TypeArgumentContextProvider.IInitializableTypeArgumentContext contextDelegate)
Method Detail

isDebugEnabled

public static boolean isDebugEnabled()

indent

protected void indent()

dedent

protected void dedent()

initialize

public void initialize(TypeArgumentContextProvider.Request request,
                       TypeArgumentContextProvider contextProvider)
Specified by:
initialize in interface TypeArgumentContextProvider.IInitializableTypeArgumentContext

getBoundArgument

public JvmTypeReference getBoundArgument(JvmTypeParameter parameter)
Specified by:
getBoundArgument in interface ITypeArgumentContext

getLowerBound

public JvmTypeReference getLowerBound(JvmTypeReference reference)
Specified by:
getLowerBound in interface ITypeArgumentContext

getUpperBound

public JvmTypeReference getUpperBound(JvmTypeReference reference,
                                      org.eclipse.emf.common.notify.Notifier context)
Specified by:
getUpperBound in interface ITypeArgumentContext

resolve

public JvmTypeReference resolve(JvmTypeReference reference)
Specified by:
resolve in interface ITypeArgumentContext

isRawTypeContext

public boolean isRawTypeContext()
Specified by:
isRawTypeContext in interface ITypeArgumentContext

getReceiverType

public JvmTypeReference getReceiverType()
Specified by:
getReceiverType in interface TypeArgumentContextProvider.Request
Returns:
the receiver type or null.

getFeature

public JvmFeature getFeature()
Specified by:
getFeature in interface TypeArgumentContextProvider.Request
Returns:
the feature or null.

getIdentifier

protected java.lang.String getIdentifier(JvmIdentifiableElement identifiable)

getNearestDeclarator

public JvmTypeParameterDeclarator getNearestDeclarator()
Specified by:
getNearestDeclarator in interface TypeArgumentContextProvider.Request
Returns:
the nearest type parameter declarator

getArgumentTypes

public java.util.List<JvmTypeReference> getArgumentTypes()
Specified by:
getArgumentTypes in interface TypeArgumentContextProvider.Request
Returns:
the arguments for the executable or null iff no executable context. May be empty.

getExplicitTypeArgument

public java.util.List<JvmTypeReference> getExplicitTypeArgument()
Specified by:
getExplicitTypeArgument in interface TypeArgumentContextProvider.Request
Returns:
the explicit type arguments or null iff no declarator is available.

getExpectedType

public JvmTypeReference getExpectedType()
Specified by:
getExpectedType in interface TypeArgumentContextProvider.Request
Returns:
the expected type or null.

getDeclaredType

public JvmTypeReference getDeclaredType()
Specified by:
getDeclaredType in interface TypeArgumentContextProvider.Request
Returns:
the expected type or null.

getDeclaredBoundsContext

protected ITypeArgumentContext getDeclaredBoundsContext(JvmExecutable feature)
Overrides:
getDeclaredBoundsContext in class TypeArgumentContextProvider

getExpectedTypeContext

protected ITypeArgumentContext getExpectedTypeContext(JvmTypeReference declaredType,
                                                      JvmTypeReference expectedType)
Overrides:
getExpectedTypeContext in class TypeArgumentContextProvider

getExplicitArgumentContext

protected ITypeArgumentContext getExplicitArgumentContext(JvmExecutable executable,
                                                          java.util.List<JvmTypeReference> explicitTypeArguments)
Overrides:
getExplicitArgumentContext in class TypeArgumentContextProvider

getParameterContext

protected ITypeArgumentContext getParameterContext(JvmExecutable executable,
                                                   java.util.List<JvmTypeReference> argumentTypes)
Overrides:
getParameterContext in class TypeArgumentContextProvider

getReceiverContext

protected TypeArgumentContext getReceiverContext(JvmTypeReference receiverType)
Overrides:
getReceiverContext in class TypeArgumentContextProvider