Class IResolvedTypes.NullResolvedTypes

  • All Implemented Interfaces:
    IResolvedTypes
    Enclosing interface:
    IResolvedTypes

    public static class IResolvedTypes.NullResolvedTypes
    extends java.lang.Object
    implements IResolvedTypes
    Noextend:
    This class is not intended to be subclassed by clients.
    Noinstantiate:
    This class is not intended to be instantiated by clients.
    • Constructor Detail

      • NullResolvedTypes

        protected NullResolvedTypes()
    • Method Detail

      • getQueuedDiagnostics

        public java.util.Collection<org.eclipse.xtext.diagnostics.AbstractDiagnostic> getQueuedDiagnostics()
        Description copied from interface: IResolvedTypes
        Provides access to all diagnostics that have been added during the type computation so far.
        Specified by:
        getQueuedDiagnostics in interface IResolvedTypes
      • getFollowUpErrors

        public java.util.Collection<ILinkingCandidate> getFollowUpErrors()
        Description copied from interface: IResolvedTypes
        Returns the linking candidates that could not be resolved but are not exposed to the users because they are follow up errors.
        Specified by:
        getFollowUpErrors in interface IResolvedTypes
      • getActualTypeArguments

        public java.util.List<LightweightTypeReference> getActualTypeArguments​(XExpression expression)
        Description copied from interface: IResolvedTypes
        Returns the resolved type arguments. If the expression refers to a constructor and the constructor itself defines type parameters, their resolved representation is prepended to the list of type arguments. Consider the following type:
         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.
        Specified by:
        getActualTypeArguments in interface IResolvedTypes
        Parameters:
        expression - may either be an XAbstractFeatureCall or XConstructorCall. May not be null.
      • getActualType

        public LightweightTypeReference getActualType​(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
        Description copied from interface: IResolvedTypes
        Returns the actually inferred or declared type for the given identifiable or null if none.
        Specified by:
        getActualType in interface IResolvedTypes
        Parameters:
        identifiable - identifiable whose type is queried.
      • isVoidTypeAllowed

        public boolean isVoidTypeAllowed​(XExpression expression)
        Description copied from interface: IResolvedTypes
        Returns true if the given expression may have the type void.
        Specified by:
        isVoidTypeAllowed in interface IResolvedTypes
        Parameters:
        expression - expression whose expected type is queried.
      • getLinkedFeature

        public org.eclipse.xtext.common.types.JvmIdentifiableElement getLinkedFeature​(XAbstractFeatureCall featureCall)
        Description copied from interface: IResolvedTypes
        Returns the intermediate linking result for the given feature call, if any. If the feature call is null, the result is null.
        Specified by:
        getLinkedFeature in interface IResolvedTypes
        Parameters:
        featureCall - the feature call that is queried for the current linking state.
        Returns:
        the potentially intermediate linking state or null if none.
      • getLinkingCandidate

        public IFeatureLinkingCandidate getLinkingCandidate​(XAbstractFeatureCall featureCall)
        Description copied from interface: IResolvedTypes
        Returns the intermediate linking candidate for the given feature call, if any. If the feature call is null, the result is null.
        Specified by:
        getLinkingCandidate in interface IResolvedTypes
        Parameters:
        featureCall - the feature call that is queried for the current linking state.
        Returns:
        the potentially intermediate linking state or null if none.
      • getLinkedFeature

        public org.eclipse.xtext.common.types.JvmIdentifiableElement getLinkedFeature​(XConstructorCall constructorCall)
        Description copied from interface: IResolvedTypes
        Returns the intermediate linking result for the given constructor call, if any. If the constructor call is null, the result is null. If the constructor call is broken, it may return a JvmType instead of a JvmConstructor.
        Specified by:
        getLinkedFeature in interface IResolvedTypes
        Parameters:
        constructorCall - the constructor call that is queried for the current linking state.
        Returns:
        the potentially intermediate linking state or null if none.
      • getLinkingCandidate

        public IConstructorLinkingCandidate getLinkingCandidate​(XConstructorCall constructorCall)
        Description copied from interface: IResolvedTypes
        Returns the intermediate linking candidate for the given constructor call, if any. If the constructor call is null, the result is null. If the constructor call is broken, it may return a JvmType instead of a JvmConstructor.
        Specified by:
        getLinkingCandidate in interface IResolvedTypes
        Parameters:
        constructorCall - the constructor call that is queried for the current linking state.
        Returns:
        the potentially intermediate linking state or null if none.
      • isRefinedType

        public boolean isRefinedType​(XExpression expression)
        Description copied from interface: IResolvedTypes
        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. Any feature call to that reference is considered to be based on a refined type.
        Specified by:
        isRefinedType in interface IResolvedTypes
        Parameters:
        expression - the expression that may have been typed based on a refinement.
        Returns:
        true if the type was refined, false otherwise.
      • getExpressionScope

        public IExpressionScope getExpressionScope​(org.eclipse.emf.ecore.EObject context,
                                                   IExpressionScope.Anchor anchor)
        Description copied from interface: IResolvedTypes
        Returns the scope the given expression is contained in. This considers all decision paths that were taken while computing the type of the expression. The returned scope carries some meta data such as whether there was an attempt to resolve the given expression as a type.
        Specified by:
        getExpressionScope in interface IResolvedTypes