public static class IResolvedTypes.NullResolvedTypes extends java.lang.Object implements IResolvedTypes
IResolvedTypes.NullResolvedTypesNULL| Modifier | Constructor and Description |
|---|---|
protected |
NullResolvedTypes() |
| Modifier and Type | Method and Description |
|---|---|
LightweightTypeReference |
getActualType(org.eclipse.xtext.common.types.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.
|
org.eclipse.xtext.common.types.JvmIdentifiableElement |
getLinkedFeature(XAbstractFeatureCall featureCall)
Returns the intermediate linking result for the given feature call, if any.
|
org.eclipse.xtext.common.types.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<org.eclipse.xtext.diagnostics.AbstractDiagnostic> |
getQueuedDiagnostics() |
LightweightTypeReference |
getReturnType(XExpression expression)
Returns the actually inferred return type for the given expression or
null if none. |
LightweightTypeReference |
getReturnType(XExpression expression,
boolean onlyExplicitReturn)
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. |
boolean |
isVoidTypeAllowed(XExpression expression)
Returns
true if the given expression may have the type void. |
public java.util.Collection<org.eclipse.xtext.diagnostics.AbstractDiagnostic> getQueuedDiagnostics()
getQueuedDiagnostics in interface IResolvedTypespublic java.util.Collection<ILinkingCandidate> getFollowUpErrors()
IResolvedTypesgetFollowUpErrors in interface IResolvedTypespublic java.util.Collection<IAmbiguousLinkingCandidate> getAmbiguousLinkingCandidates()
IResolvedTypesgetAmbiguousLinkingCandidates in interface IResolvedTypespublic LightweightTypeReference getExpectedType(XExpression expression)
IResolvedTypesnull if none.getExpectedType in interface IResolvedTypesexpression - expression whose expected type is queried.public LightweightTypeReference getExpectedReturnType(XExpression expression)
IResolvedTypesnull if none.getExpectedReturnType in interface IResolvedTypesexpression - expression whose expected return 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 IResolvedTypesexpression - may either be an XAbstractFeatureCall or XConstructorCall. May not be null.public java.util.List<LightweightTypeReference> getThrownExceptions(XExpression obj)
getThrownExceptions in interface IResolvedTypespublic LightweightTypeReference getActualType(XExpression expression)
IResolvedTypesnull if none.getActualType in interface IResolvedTypesexpression - expression whose type is queried.public LightweightTypeReference getReturnType(XExpression expression)
IResolvedTypesnull if none.
Returns the actual expression type, if no explicit return type exists.
Shorthand for getReturnType(expression, false)getReturnType in interface IResolvedTypesexpression - expression whose return type is queried.public LightweightTypeReference getReturnType(XExpression expression, boolean onlyExplicitReturn)
IResolvedTypesnull if none.getReturnType in interface IResolvedTypesexpression - expression whose return type is queried.public LightweightTypeReference getActualType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
IResolvedTypesnull if none.getActualType in interface IResolvedTypesidentifiable - identifiable whose type is queried.public boolean isVoidTypeAllowed(XExpression expression)
IResolvedTypestrue if the given expression may have the type void.isVoidTypeAllowed in interface IResolvedTypesexpression - expression whose expected type is queried.public org.eclipse.xtext.common.types.JvmIdentifiableElement getLinkedFeature(XAbstractFeatureCall featureCall)
IResolvedTypesnull, the result is null.getLinkedFeature in interface IResolvedTypesfeatureCall - the feature call that is queried for the current linking state.null if none.public IFeatureLinkingCandidate getLinkingCandidate(XAbstractFeatureCall featureCall)
IResolvedTypesnull, the result is null.getLinkingCandidate in interface IResolvedTypesfeatureCall - the feature call that is queried for the current linking state.null if none.public org.eclipse.xtext.common.types.JvmIdentifiableElement getLinkedFeature(XConstructorCall constructorCall)
IResolvedTypesnull, the result is null.
If the constructor call is broken, it may return a JvmType instead of
a JvmConstructor.getLinkedFeature in interface IResolvedTypesconstructorCall - the constructor call that is queried for the current linking state.null if none.public IConstructorLinkingCandidate getLinkingCandidate(XConstructorCall constructorCall)
IResolvedTypesnull, the result is null.
If the constructor call is broken, it may return a JvmType instead of
a JvmConstructor.getLinkingCandidate in interface IResolvedTypesconstructorCall - the constructor call that is queried for the current linking state.null if none.public boolean isRefinedType(XExpression expression)
IResolvedTypestrue 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 IResolvedTypesexpression - the expression that may have been typed based on a refinement.true if the type was refined, false otherwise.public IExpressionScope getExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)
IResolvedTypesgetExpressionScope in interface IResolvedTypespublic boolean hasExpressionScope(org.eclipse.emf.ecore.EObject context,
IExpressionScope.Anchor anchor)
hasExpressionScope in interface IResolvedTypes