org.eclipse.xtext.xbase.typesystem.internal
Class ResolvedTypes
java.lang.Object
org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes
- All Implemented Interfaces:
- IResolvedTypes
- Direct Known Subclasses:
- StackedResolvedTypes
public class ResolvedTypes
- extends java.lang.Object
- implements IResolvedTypes
- Author:
- Sebastian Zarnekow - Initial contribution and API
TODO JavaDoc, toString
Method Summary |
void |
acceptLinkingInformation(XExpression expression,
ILinkingCandidate candidate)
|
protected JvmTypeReference |
acceptType(XExpression expression,
AbstractTypeExpectation expectation,
JvmTypeReference type,
ConformanceHint conformanceHint,
boolean returnType)
|
protected com.google.common.collect.Multimap<XExpression,TypeData> |
ensureExpressionTypesMapExists()
|
protected java.util.Map<XExpression,ILinkingCandidate> |
ensureLinkingMapExists()
|
protected java.util.Map<JvmIdentifiableElement,JvmTypeReference> |
ensureReassignedTypesMapExists()
|
protected java.util.Map<JvmIdentifiableElement,JvmTypeReference> |
ensureTypesMapExists()
|
JvmTypeReference |
getActualType(JvmIdentifiableElement identifiable)
|
JvmTypeReference |
getActualType(XExpression expression)
|
java.util.List<JvmTypeReference> |
getActualTypeArguments(XExpression expression)
|
protected JvmTypeReference |
getCommonType(java.util.List<JvmTypeReference> types)
|
IConstructorLinkingCandidate |
getConstructor(XConstructorCall constructorCall)
|
protected JvmTypeReference |
getDeclaredType(JvmIdentifiableElement identifiable)
|
JvmTypeReference |
getExpectedType(XExpression expression)
|
IFeatureLinkingCandidate |
getFeature(XAbstractFeatureCall featureCall)
|
java.util.List<org.eclipse.emf.common.util.Diagnostic> |
getQueuedDiagnostics()
|
protected DefaultReentrantTypeResolver |
getResolver()
|
protected TypeConformanceComputer |
getTypeConformanceComputer()
|
protected TypeData |
getTypeData(XExpression expression,
boolean returnType)
|
protected XtypeFactory |
getXtypeFactory()
|
protected boolean |
isValidForMergedResult(JvmTypeReference reference,
JvmTypeReference mayNotBe)
|
protected TypeData |
mergeTypeData(XExpression expression,
java.util.Collection<TypeData> allValues,
boolean returnType)
|
void |
reassignType(JvmIdentifiableElement identifiable,
JvmTypeReference reference)
|
void |
setType(JvmIdentifiableElement identifiable,
JvmTypeReference reference)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResolvedTypes
protected ResolvedTypes(DefaultReentrantTypeResolver resolver)
getQueuedDiagnostics
public java.util.List<org.eclipse.emf.common.util.Diagnostic> getQueuedDiagnostics()
- Specified by:
getQueuedDiagnostics
in interface IResolvedTypes
getTypeData
protected TypeData getTypeData(XExpression expression,
boolean returnType)
mergeTypeData
protected TypeData mergeTypeData(XExpression expression,
java.util.Collection<TypeData> allValues,
boolean returnType)
getXtypeFactory
protected XtypeFactory getXtypeFactory()
isValidForMergedResult
protected boolean isValidForMergedResult(JvmTypeReference reference,
JvmTypeReference mayNotBe)
getCommonType
protected JvmTypeReference getCommonType(java.util.List<JvmTypeReference> types)
getTypeConformanceComputer
protected TypeConformanceComputer getTypeConformanceComputer()
getActualType
public JvmTypeReference getActualType(XExpression expression)
- Specified by:
getActualType
in interface IResolvedTypes
getExpectedType
public JvmTypeReference getExpectedType(XExpression expression)
- Specified by:
getExpectedType
in interface IResolvedTypes
getActualTypeArguments
public java.util.List<JvmTypeReference> getActualTypeArguments(XExpression expression)
- Specified by:
getActualTypeArguments
in interface IResolvedTypes
- Parameters:
expression
- may either be an XAbstractFeatureCall
or XConstructorCall
. May not be null
.
setType
public void setType(JvmIdentifiableElement identifiable,
JvmTypeReference reference)
reassignType
public void reassignType(JvmIdentifiableElement identifiable,
JvmTypeReference reference)
acceptType
protected JvmTypeReference acceptType(XExpression expression,
AbstractTypeExpectation expectation,
JvmTypeReference type,
ConformanceHint conformanceHint,
boolean returnType)
ensureTypesMapExists
protected java.util.Map<JvmIdentifiableElement,JvmTypeReference> ensureTypesMapExists()
ensureReassignedTypesMapExists
protected java.util.Map<JvmIdentifiableElement,JvmTypeReference> ensureReassignedTypesMapExists()
ensureExpressionTypesMapExists
protected com.google.common.collect.Multimap<XExpression,TypeData> ensureExpressionTypesMapExists()
ensureLinkingMapExists
protected java.util.Map<XExpression,ILinkingCandidate> ensureLinkingMapExists()
getActualType
public JvmTypeReference getActualType(JvmIdentifiableElement identifiable)
- Specified by:
getActualType
in interface IResolvedTypes
getDeclaredType
protected JvmTypeReference getDeclaredType(JvmIdentifiableElement identifiable)
getFeature
public IFeatureLinkingCandidate getFeature(XAbstractFeatureCall featureCall)
getConstructor
public IConstructorLinkingCandidate getConstructor(XConstructorCall constructorCall)
acceptLinkingInformation
public void acceptLinkingInformation(XExpression expression,
ILinkingCandidate candidate)
getResolver
protected DefaultReentrantTypeResolver getResolver()