@NonNullByDefault 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) |
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. |
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. |
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
@Nullable 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 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.@Nullable public LightweightTypeReference getReturnType(XExpression expression)
IResolvedTypes
null
if none.getReturnType
in interface IResolvedTypes
expression
- expression whose return type is queried.@Nullable public LightweightTypeReference getExpectedReturnType(XExpression expression)
IResolvedTypes
null
if none.getExpectedReturnType
in interface IResolvedTypes
expression
- expression whose expected return type is queried.@Nullable public LightweightTypeReference getActualType(JvmIdentifiableElement identifiable)
IResolvedTypes
null
if none.getActualType
in interface IResolvedTypes
identifiable
- identifiable whose type is queried.@Nullable 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)
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.@Nullable public JvmIdentifiableElement getLinkedFeature(@Nullable 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.@Nullable public IFeatureLinkingCandidate getLinkingCandidate(@Nullable 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.@Nullable public JvmIdentifiableElement getLinkedFeature(@Nullable 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.@Nullable public IConstructorLinkingCandidate getLinkingCandidate(@Nullable 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.