|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.xbase.typing.AbstractTypeProvider
public abstract class AbstractTypeProvider
Nested Class Summary | |
---|---|
static class |
AbstractTypeProvider.EarlyExitAcceptor
|
protected static class |
AbstractTypeProvider.ImmutableLinkedItem<T>
|
Field Summary | |
---|---|
protected org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<XExpression> |
getExpectedType
|
protected org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<Pair<XExpression,JvmTypeReference>> |
getType
|
protected org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<JvmIdentifiableElement> |
getTypeForIdentifiable
|
Constructor Summary | |
---|---|
AbstractTypeProvider()
|
Method Summary | ||
---|---|---|
protected void |
_earlyExits(org.eclipse.emf.ecore.EObject expr,
AbstractTypeProvider.EarlyExitAcceptor acceptor)
|
|
protected void |
_earlyExits(JvmTypeReference ref,
AbstractTypeProvider.EarlyExitAcceptor a)
Computes early exits of type references. |
|
protected void |
_earlyExits(java.lang.Void expr,
AbstractTypeProvider.EarlyExitAcceptor a)
Computes early exits of null . |
|
protected JvmTypeReference |
_expectedType(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
|
protected JvmTypeReference |
_type(XExpression expression,
JvmTypeReference rawExpectation,
boolean rawType)
|
|
protected JvmTypeReference |
_typeForIdentifiable(JvmIdentifiableElement identifiable,
boolean rawType)
|
|
protected void |
checkIsSingelton()
|
|
protected
|
doGetType(java.lang.String key,
T object,
boolean rawType,
org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<T> typeComputer)
|
|
protected JvmTypeReference |
expectedType(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
int index,
boolean rawType)
|
|
JvmTypeReference |
getCommonReturnType(XExpression expression,
boolean assumeImplicitReturnExpression)
The return type of an expression is the common super type of all types used within a return expression. |
|
protected JvmConstructor |
getConstructor(XConstructorCall expr)
|
|
protected JvmConstructor |
getConstructor(XConstructorCall expr,
boolean resolve)
|
|
protected Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,java.lang.Integer> |
getContainingInfo(XExpression obj)
|
|
protected java.lang.String |
getDebugIndentation(boolean rawType)
|
|
JvmTypeReference |
getExpectedType(XExpression expression)
Return the resolved expected type of the given expression. |
|
JvmTypeReference |
getExpectedType(XExpression expression,
boolean rawType)
|
|
protected JvmIdentifiableElement |
getFeature(XAbstractFeatureCall expr)
|
|
protected JvmIdentifiableElement |
getFeature(XAbstractFeatureCall expr,
boolean resolve)
|
|
protected ILogicalContainerProvider |
getLogicalContainerProvider()
|
|
protected org.eclipse.emf.ecore.EObject |
getLogicalOrRealContainer(org.eclipse.emf.ecore.EObject obj)
|
|
protected
|
getLogicalOrRealContainer(org.eclipse.emf.ecore.EObject obj,
java.lang.Class<T> type)
|
|
protected JvmTypeParameterDeclarator |
getNearestTypeParameterDeclarator(org.eclipse.emf.ecore.EObject obj)
|
|
java.lang.Iterable<JvmTypeReference> |
getThrownExceptionTypes(XExpression expression)
returns all exception types, thrown within the given expression. |
|
JvmTypeReference |
getType(XExpression expression)
Return the resolved type of the given expression. |
|
JvmTypeReference |
getType(XExpression expression,
boolean rawType)
|
|
JvmTypeReference |
getType(XExpression expression,
JvmTypeReference rawExpectation,
boolean rawType)
|
|
protected TypeArgumentContextProvider |
getTypeArgumentContextProvider()
|
|
protected TypeConformanceComputer |
getTypeConformanceComputer()
|
|
JvmTypeReference |
getTypeForIdentifiable(JvmIdentifiableElement identifiableElement)
Return the resolved type of the element. |
|
JvmTypeReference |
getTypeForIdentifiable(JvmIdentifiableElement identifiableElement,
boolean rawType)
|
|
protected TypeReferences |
getTypeReferences()
|
|
protected JvmTypeReference |
handleCycleGetExpectedType(XExpression expression,
boolean rawType)
Allows to handle cyclic resolution of expected types. |
|
protected JvmTypeReference |
handleCycleGetTypeForIdentifiable(JvmIdentifiableElement identifiableElement,
boolean rawType)
Allows to handle cyclic resolution of types. |
|
protected JvmTypeReference |
handleCyclicGetType(XExpression expression,
JvmTypeReference rawExpectation,
boolean rawType)
Allows to handle cyclic type resolution. |
|
protected void |
internalCollectEarlyExits(org.eclipse.emf.ecore.EObject expr,
AbstractTypeProvider.EarlyExitAcceptor acceptor)
|
|
protected boolean |
isDeclaratorOf(JvmTypeParameterDeclarator declarator,
JvmTypeParameter param)
|
|
protected boolean |
isResolved(JvmTypeReference reference,
JvmTypeParameterDeclarator declarator,
boolean rawType)
|
|
protected boolean |
isResolved(JvmTypeReference reference,
JvmTypeParameterDeclarator declarator,
boolean rawType,
boolean allowAnyType,
java.util.Set<JvmTypeReference> visited)
|
|
protected JvmTypeReference |
type(XExpression expression,
JvmTypeReference rawExpectation,
boolean rawType)
|
|
protected JvmTypeReference |
typeForIdentifiable(JvmIdentifiableElement identifiable,
boolean rawType)
|
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.xbase.typing.ITypeProvider |
---|
getExpectedReturnType, getThrownExceptionForIdentifiable, getTypeArgumentContext, getTypeArgumentContext |
Field Detail |
---|
protected org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<Pair<XExpression,JvmTypeReference>> getType
protected org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<XExpression> getExpectedType
protected org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<JvmIdentifiableElement> getTypeForIdentifiable
Constructor Detail |
---|
public AbstractTypeProvider()
Method Detail |
---|
protected void checkIsSingelton()
protected boolean isResolved(JvmTypeReference reference, JvmTypeParameterDeclarator declarator, boolean rawType)
protected boolean isResolved(JvmTypeReference reference, JvmTypeParameterDeclarator declarator, boolean rawType, boolean allowAnyType, java.util.Set<JvmTypeReference> visited)
protected JvmTypeParameterDeclarator getNearestTypeParameterDeclarator(org.eclipse.emf.ecore.EObject obj)
protected org.eclipse.emf.ecore.EObject getLogicalOrRealContainer(org.eclipse.emf.ecore.EObject obj)
protected <T> T getLogicalOrRealContainer(org.eclipse.emf.ecore.EObject obj, java.lang.Class<T> type)
protected boolean isDeclaratorOf(JvmTypeParameterDeclarator declarator, JvmTypeParameter param)
protected JvmTypeReference _type(XExpression expression, JvmTypeReference rawExpectation, boolean rawType)
rawExpectation
- the expected raw type if set from the outside. May be null
.rawType
- true
if we are only interested in the raw typeprotected JvmIdentifiableElement getFeature(XAbstractFeatureCall expr, boolean resolve)
protected JvmIdentifiableElement getFeature(XAbstractFeatureCall expr)
protected JvmConstructor getConstructor(XConstructorCall expr, boolean resolve)
protected JvmConstructor getConstructor(XConstructorCall expr)
protected JvmTypeReference type(XExpression expression, JvmTypeReference rawExpectation, boolean rawType)
protected java.lang.String getDebugIndentation(boolean rawType)
protected <T> JvmTypeReference doGetType(java.lang.String key, T object, boolean rawType, org.eclipse.xtext.xbase.typing.AbstractTypeProvider.CyclicHandlingSupport<T> typeComputer)
public JvmTypeReference getType(XExpression expression)
ITypeProvider
getType(expression, false
.
getType
in interface ITypeProvider
expression
- the expression. May not be null
.
XExpression
, if a correct, fully-linkable model is given.
null
indicates a problem during resolution.public JvmTypeReference getType(XExpression expression, boolean rawType)
getType
in interface ITypeProvider
expression
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.
XExpression
, if a correct, fully-linkable model is given.
null
indicates a problem during resolution.public JvmTypeReference getType(XExpression expression, JvmTypeReference rawExpectation, boolean rawType)
getType
in interface ITypeProvider
expression
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.
XExpression
, if a correct, fully-linkable model is given.
null
indicates a problem during resolution.protected JvmTypeReference handleCyclicGetType(XExpression expression, JvmTypeReference rawExpectation, boolean rawType)
expression
- the expression that was asked reentrant for its type.rawExpectation
- the expected raw type if set from the outside. May be null
.rawType
- true
if we are only interested in the raw typeprotected JvmTypeReference _expectedType(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
container
- the container that owns the expression that may have a type expectation.reference
- the reference that can be used to obtain the expression with a type expectation.index
- the index if reference
is a multi value
feature.rawType
- true
if we are only interested in the type parameter.protected JvmTypeReference expectedType(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EReference reference, int index, boolean rawType)
public JvmTypeReference getExpectedType(XExpression expression)
ITypeProvider
getExpectedType(expression, false
.
getExpectedType
in interface ITypeProvider
expression
- the expression. May not be null
.
null
if no special type is expectedpublic JvmTypeReference getExpectedType(XExpression expression, boolean rawType)
getExpectedType
in interface ITypeProvider
expression
- the expression. May not be null
.rawType
- true
if the raw type is sufficient.
null
if no special type is expectedprotected JvmTypeReference handleCycleGetExpectedType(XExpression expression, boolean rawType)
expression
- the expression that was asked reentrant for its expected type.rawType
- true
if we are only interested in the raw typeprotected Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,java.lang.Integer> getContainingInfo(XExpression obj)
protected JvmTypeReference _typeForIdentifiable(JvmIdentifiableElement identifiable, boolean rawType)
rawType
- true
if we are only interested in the type parameter.protected JvmTypeReference typeForIdentifiable(JvmIdentifiableElement identifiable, boolean rawType)
public JvmTypeReference getTypeForIdentifiable(JvmIdentifiableElement identifiableElement)
ITypeProvider
getTypeForIdentifiable(identifiableElement, false
.
getTypeForIdentifiable
in interface ITypeProvider
identifiableElement
- the identifiable element. May not be null
.
JvmIdentifiableElement
, if a correct, fully-linkable model is
given. null
indicates a problem during resolution. given.public JvmTypeReference getTypeForIdentifiable(JvmIdentifiableElement identifiableElement, boolean rawType)
getTypeForIdentifiable
in interface ITypeProvider
identifiableElement
- the identifiable element. May not be null
.rawType
- true
if the raw type is sufficient.
JvmIdentifiableElement
, if a correct, fully-linkable model is
given. null
indicates a problem during resolution. given.protected JvmTypeReference handleCycleGetTypeForIdentifiable(JvmIdentifiableElement identifiableElement, boolean rawType)
identifiableElement
- the element that was asked reentrant for its type.rawType
- true
if we are only interested in the raw typepublic JvmTypeReference getCommonReturnType(XExpression expression, boolean assumeImplicitReturnExpression)
ITypeProvider
getCommonReturnType
in interface ITypeProvider
expression
- May not be null
.assumeImplicitReturnExpression
- indicating whether an implicit return expression should be assumed
XExpression
, if a correct, fully-linkable model is
given. null
indicates a problem during computation, the primitive void indicates that no return expression was found.public java.lang.Iterable<JvmTypeReference> getThrownExceptionTypes(XExpression expression)
ITypeProvider
RuntimeException
s as well.
getThrownExceptionTypes
in interface ITypeProvider
expression
- May not be null
.
null
indicates a problem during computation, an empty iterable means no thrown exceptions were found.protected void internalCollectEarlyExits(org.eclipse.emf.ecore.EObject expr, AbstractTypeProvider.EarlyExitAcceptor acceptor)
protected void _earlyExits(java.lang.Void expr, AbstractTypeProvider.EarlyExitAcceptor a)
null
.
expr
- always null
.a
- the collector of the early exit result.protected void _earlyExits(JvmTypeReference ref, AbstractTypeProvider.EarlyExitAcceptor a)
ref
- the type reference.a
- the collector of the early exit result.protected void _earlyExits(org.eclipse.emf.ecore.EObject expr, AbstractTypeProvider.EarlyExitAcceptor acceptor)
protected TypeConformanceComputer getTypeConformanceComputer()
protected TypeReferences getTypeReferences()
protected TypeArgumentContextProvider getTypeArgumentContextProvider()
protected ILogicalContainerProvider getLogicalContainerProvider()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |