public abstract class ForwardingResolvedTypes extends com.google.common.collect.ForwardingObject implements IResolvedTypes
IResolvedTypes.NullResolvedTypes
NULL
Constructor and Description |
---|
ForwardingResolvedTypes() |
Modifier and Type | Method and Description |
---|---|
protected abstract IResolvedTypes |
delegate() |
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 . |
protected abstract IResolvedTypes delegate()
delegate
in class com.google.common.collect.ForwardingObject
public LightweightTypeReference getActualType(XExpression expression)
IResolvedTypes
null
if none.getActualType
in interface IResolvedTypes
expression
- expression whose type is queried.public java.util.Collection<ILinkingCandidate> getFollowUpErrors()
IResolvedTypes
getFollowUpErrors
in interface IResolvedTypes
public java.util.Collection<IAmbiguousLinkingCandidate> getAmbiguousLinkingCandidates()
IResolvedTypes
getAmbiguousLinkingCandidates
in interface IResolvedTypes
public boolean isRefinedType(XExpression expression)
IResolvedTypes
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.isRefinedType
in interface IResolvedTypes
expression
- the expression that may have been typed based on a refinement.true
if the type was refined, false
otherwise.public LightweightTypeReference getReturnType(XExpression expression)
IResolvedTypes
null
if none.getReturnType
in interface IResolvedTypes
expression
- expression whose return type is queried.public LightweightTypeReference getExpectedReturnType(XExpression expression)
IResolvedTypes
null
if none.getExpectedReturnType
in interface IResolvedTypes
expression
- expression whose expected return type is queried.public LightweightTypeReference getActualType(JvmIdentifiableElement identifiable)
IResolvedTypes
null
if none.getActualType
in interface IResolvedTypes
identifiable
- identifiable whose type is queried.public java.util.List<LightweightTypeReference> getThrownExceptions(XExpression obj)
getThrownExceptions
in interface IResolvedTypes
public LightweightTypeReference getExpectedType(XExpression expression)
IResolvedTypes
null
if none.getExpectedType
in interface IResolvedTypes
expression
- expression whose expected type is queried.public java.util.List<LightweightTypeReference> getActualTypeArguments(XExpression expression)
IResolvedTypes
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
.getActualTypeArguments
in interface IResolvedTypes
expression
- may either be an XAbstractFeatureCall
or XConstructorCall
. May not be null
.public java.util.Collection<AbstractDiagnostic> getQueuedDiagnostics()
getQueuedDiagnostics
in interface IResolvedTypes
public boolean isVoidTypeAllowed(XExpression expression)
IResolvedTypes
true
if the given expression may have the type void
.isVoidTypeAllowed
in interface IResolvedTypes
expression
- expression whose expected type is queried.public JvmIdentifiableElement getLinkedFeature(XAbstractFeatureCall featureCall)
IResolvedTypes
null
, the result is null
.getLinkedFeature
in interface IResolvedTypes
featureCall
- the feature call that is queried for the current linking state.null
if none.public IFeatureLinkingCandidate getLinkingCandidate(XAbstractFeatureCall featureCall)
IResolvedTypes
null
, the result is null
.getLinkingCandidate
in interface IResolvedTypes
featureCall
- the feature call that is queried for the current linking state.null
if none.public JvmIdentifiableElement getLinkedFeature(XConstructorCall constructorCall)
IResolvedTypes
null
, the result is null
.
If the constructor call is broken, it may return a JvmType
instead of
a JvmConstructor
.getLinkedFeature
in interface IResolvedTypes
constructorCall
- the constructor call that is queried for the current linking state.null
if none.public IConstructorLinkingCandidate getLinkingCandidate(XConstructorCall constructorCall)
IResolvedTypes
null
, the result is null
.
If the constructor call is broken, it may return a JvmType
instead of
a JvmConstructor
.getLinkingCandidate
in interface IResolvedTypes
constructorCall
- the constructor call that is queried for the current linking state.null
if none.public IExpressionScope getExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)
IResolvedTypes
getExpressionScope
in interface IResolvedTypes
public boolean hasExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)
hasExpressionScope
in interface IResolvedTypes