public interface IResolvedTypes
Modifier and Type | Interface and Description |
---|---|
static class |
IResolvedTypes.NullResolvedTypes |
Modifier and Type | Field and Description |
---|---|
static IResolvedTypes |
NULL |
Modifier and Type | Method and Description |
---|---|
LightweightTypeReference |
getActualType(JvmIdentifiableElement identifiable)
Returns the actually inferred or declared type for the given identifiable or
null if none. |
LightweightTypeReference |
getActualType(XExpression expression)
Returns the actually inferred type for the given expression or
null if none. |
java.util.List<LightweightTypeReference> |
getActualTypeArguments(XExpression expression)
Returns the resolved type arguments.
|
java.util.Collection<IAmbiguousLinkingCandidate> |
getAmbiguousLinkingCandidates()
Returns all ambiguous linking candidates that have been encountered.
|
LightweightTypeReference |
getExpectedReturnType(XExpression expression)
Returns the expected return type for the given expression or
null if none. |
LightweightTypeReference |
getExpectedType(XExpression expression)
Returns the actually expected type for the given expression or
null if none. |
IExpressionScope |
getExpressionScope(org.eclipse.emf.ecore.EObject context,
IExpressionScope.Anchor anchor)
Returns the scope the given expression is contained in.
|
java.util.Collection<ILinkingCandidate> |
getFollowUpErrors()
Returns the linking candidates that could not be resolved but are not
exposed to the users because they are follow up errors.
|
JvmIdentifiableElement |
getLinkedFeature(XAbstractFeatureCall featureCall)
Returns the intermediate linking result for the given feature call, if any.
|
JvmIdentifiableElement |
getLinkedFeature(XConstructorCall constructorCall)
Returns the intermediate linking result for the given constructor call, if any.
|
IFeatureLinkingCandidate |
getLinkingCandidate(XAbstractFeatureCall featureCall)
Returns the intermediate linking candidate for the given feature call, if any.
|
IConstructorLinkingCandidate |
getLinkingCandidate(XConstructorCall constructorCall)
Returns the intermediate linking candidate for the given constructor call, if any.
|
java.util.Collection<AbstractDiagnostic> |
getQueuedDiagnostics() |
LightweightTypeReference |
getReturnType(XExpression expression)
Returns the actually inferred return type for the given expression or
null if none. |
java.util.List<LightweightTypeReference> |
getThrownExceptions(XExpression obj) |
boolean |
hasExpressionScope(org.eclipse.emf.ecore.EObject context,
IExpressionScope.Anchor anchor) |
boolean |
isRefinedType(XExpression expression)
Returns
true if the expression's type is based on a type
refinement, e.g. an instanceof guard my specialize the type of the checked
reference. |
boolean |
isVoidTypeAllowed(XExpression expression)
Returns
true if the given expression may have the type void . |
static final IResolvedTypes NULL
java.util.Collection<AbstractDiagnostic> getQueuedDiagnostics()
java.util.Collection<ILinkingCandidate> getFollowUpErrors()
java.util.Collection<IAmbiguousLinkingCandidate> getAmbiguousLinkingCandidates()
LightweightTypeReference getActualType(XExpression expression)
null
if none.expression
- expression whose type is queried.LightweightTypeReference getReturnType(XExpression expression)
null
if none.expression
- expression whose return type is queried.LightweightTypeReference getActualType(JvmIdentifiableElement identifiable)
null
if none.identifiable
- identifiable whose type is queried.java.util.List<LightweightTypeReference> getThrownExceptions(XExpression obj)
LightweightTypeReference getExpectedType(XExpression expression)
null
if none.expression
- expression whose expected type is queried.boolean isVoidTypeAllowed(XExpression expression)
true
if the given expression may have the type void
.expression
- expression whose expected type is queried.LightweightTypeReference getExpectedReturnType(XExpression expression)
null
if none.expression
- expression whose expected return type is queried.java.util.List<LightweightTypeReference> getActualTypeArguments(XExpression expression)
class C<T, V> { public <PLgt; C(P p) {} }An invocation of the constructor
C
will return three type arguments, the bound
values of for P
, T
and V
.expression
- may either be an XAbstractFeatureCall
or XConstructorCall
. May not be null
.JvmIdentifiableElement getLinkedFeature(XAbstractFeatureCall featureCall)
null
, the result is null
.featureCall
- the feature call that is queried for the current linking state.null
if none.JvmIdentifiableElement getLinkedFeature(XConstructorCall constructorCall)
null
, the result is null
.
If the constructor call is broken, it may return a JvmType
instead of
a JvmConstructor
.constructorCall
- the constructor call that is queried for the current linking state.null
if none.IFeatureLinkingCandidate getLinkingCandidate(XAbstractFeatureCall featureCall)
null
, the result is null
.featureCall
- the feature call that is queried for the current linking state.null
if none.IConstructorLinkingCandidate getLinkingCandidate(XConstructorCall constructorCall)
null
, the result is null
.
If the constructor call is broken, it may return a JvmType
instead of
a JvmConstructor
.constructorCall
- the constructor call that is queried for the current linking state.null
if none.boolean isRefinedType(XExpression expression)
true
if the expression's type is based on a type
refinement, e.g. an instanceof guard my specialize the type of the checked
reference. Any feature call to that reference is considered to be based on
a refined type.expression
- the expression that may have been typed based on a refinement.true
if the type was refined, false
otherwise.IExpressionScope getExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)
boolean hasExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)