Interface ITypeReferenceOwner

    • Method Detail

      • getContextResourceSet

        org.eclipse.emf.ecore.resource.ResourceSet getContextResourceSet()
        Returns the context resource set if any. May return null if there is no context information available. In those cases, the owner is rather useless.
      • newCompoundTypeReference

        CompoundTypeReference newCompoundTypeReference​(boolean synonym)
        Creates a new CompoundTypeReference that is either a synonym or a multi type reference.
        Parameters:
        synonym - whether it should be a synonym type reference.
      • newWildcardTypeReference

        WildcardTypeReference newWildcardTypeReference()
        Creates a new WildcardTypeReference without any upper or lower bounds. Usually clients need to add those to make it a valid type reference.
      • newParameterizedTypeReference

        ParameterizedTypeReference newParameterizedTypeReference​(org.eclipse.xtext.common.types.JvmType type)
        Creates a new ParameterizedTypeReference from the given type. The type may either be a JvmTypeParameter, JvmPrimitiveType, JvmDeclaredType or JvmVoid. Other types are considered invalid and will cause an IllegalArgumentException to be thrown. If the type is a non-static nested type, the produced type reference will be an InnerTypeReference. The produced type reference does not have any type arguments. If the given type is generic, the returned type reference is a raw type.
        Parameters:
        type - the raw type for the newly produced ParameterizedTypeReference
        Throws:
        java.lang.IllegalArgumentException - if the type is a JvmArrayType or null.
      • newAnyTypeReference

        AnyTypeReference newAnyTypeReference()
        Creates a new representation of the any type, e.g. the type of the value null.
      • toPlainTypeReference

        LightweightTypeReference toPlainTypeReference​(org.eclipse.xtext.common.types.JvmType type)
        Creates a new type reference that points to the given type. If the type is a JvmArrayType, an ArrayTypeReference is produced. The produced LightweightTypeReference does not have any type arguments. It is similar to a raw type reference except for cases where the type points to a JvmTypeParameter or an array of type parameters. In those cases, the result is different form toPlainTypeReference(JvmType). getRawTypeReference().
        Parameters:
        type - the type. May not be null.
      • toLightweightTypeReference

        LightweightTypeReference toLightweightTypeReference​(org.eclipse.xtext.common.types.JvmType type)
        Creates a new type reference that points to the given type. If the type is a JvmArrayType, an ArrayTypeReference is produced. The produced LightweightTypeReference does have type arguments if the given type is generic or an array of a generic type. The type arguments point to the original type parameters. Useful for later substitution of all type parameters.
        Parameters:
        type - the raw type. May not be null.
      • toLightweightTypeReference

        LightweightTypeReference toLightweightTypeReference​(org.eclipse.xtext.common.types.JvmTypeReference type)
        Transforms the given EMF based type reference to its equivalent in the LightweightTypeReference hierarchy.
        Parameters:
        type - the type to convert. May not be null.
      • acceptHint

        void acceptHint​(java.lang.Object handle,
                        LightweightBoundTypeArgument boundTypeArgument)
        Throws:
        java.lang.UnsupportedOperationException - if this owner is not capable of handling unbound type references.
      • getAllHints

        java.util.List<LightweightBoundTypeArgument> getAllHints​(java.lang.Object handle)
        Throws:
        java.lang.UnsupportedOperationException - if this owner is not capable of handling unbound type references.
      • isResolved

        boolean isResolved​(java.lang.Object handle)
        Throws:
        java.lang.UnsupportedOperationException - if this owner is not capable of handling unbound type references.
      • getDeclaredTypeParameters

        java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> getDeclaredTypeParameters()
        The currently known type parameters, e.g. the ones that should not be substituted.