org.eclipse.xtext.common.types.util
Class LazyTypeArgumentContext
java.lang.Object
org.eclipse.xtext.common.types.util.LazyTypeArgumentContext
- All Implemented Interfaces:
- ITypeArgumentContext, TypeArgumentContextProvider.IInitializableTypeArgumentContext
public class LazyTypeArgumentContext
- extends java.lang.Object
- implements TypeArgumentContextProvider.IInitializableTypeArgumentContext
Implementation of the ITypeArgumentContext
that encapsulates how the available
information of an TypeArgumentContextProvider.Request
will be used to resolve
type parameters. It maintains a chain of delegate contexts and knows which delegate has to
was already produced and which will be created next on demand.
Prior to using the class, clients have to
initialize
it.
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazyTypeArgumentContext
public LazyTypeArgumentContext()
initialize
public void initialize(TypeArgumentContextProvider.Request request,
TypeArgumentContextProvider contextProvider)
- Specified by:
initialize
in interface TypeArgumentContextProvider.IInitializableTypeArgumentContext
isRawTypeContext
public boolean isRawTypeContext()
- Specified by:
isRawTypeContext
in interface ITypeArgumentContext
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
hasNextLevel
protected boolean hasNextLevel()
computeNext
protected ITypeArgumentContext computeNext()
doComputeNext
protected ITypeArgumentContext doComputeNext()
isResolved
protected boolean isResolved(JvmTypeReference reference,
boolean rawType)
isResolved
protected boolean isResolved(JvmTypeReference reference,
boolean rawType,
boolean firstWildcardUnresolved)