Class TypeVariableImpl

  • All Implemented Interfaces:
    Type, TypeVariable

    @Deprecated
    public class TypeVariableImpl
    extends AbstractTypeImpl
    implements TypeVariable
    Deprecated.
    Implementation of TypeVariable, which represents a type variable.

    This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

    Since:
    1.5
    • Constructor Detail

      • TypeVariableImpl

        TypeVariableImpl​(DocEnv env,
                         com.sun.tools.javac.code.Type.TypeVar type)
        Deprecated.
    • Method Detail

      • bounds

        public Type[] bounds()
        Deprecated.
        Return the bounds of this type variable.
        Specified by:
        bounds in interface TypeVariable
        Returns:
        the bounds of this type variable.
      • owner

        public ProgramElementDoc owner()
        Deprecated.
        Return the class, interface, method, or constructor within which this type variable is declared.
        Specified by:
        owner in interface TypeVariable
        Returns:
        the class, interface, method, or constructor within which this type variable is declared.
      • asClassDoc

        public ClassDoc asClassDoc()
        Deprecated.
        Return the ClassDoc of the erasure of this type variable.
        Specified by:
        asClassDoc in interface Type
        Overrides:
        asClassDoc in class AbstractTypeImpl
        Returns:
        the ClassDoc of this type, or null if it is a primitive type.
      • asTypeVariable

        public TypeVariable asTypeVariable()
        Deprecated.
        Description copied from interface: Type
        Return this type as a TypeVariable if it represents a type variable. Array dimensions are ignored.
        Specified by:
        asTypeVariable in interface Type
        Overrides:
        asTypeVariable in class AbstractTypeImpl
        Returns:
        a TypeVariable if the type is a type variable, or null if it is not.
      • toString

        public java.lang.String toString()
        Deprecated.
        Description copied from interface: Type
        Return a string representation of the type. This includes any dimension information and type arguments.

        For example, a two dimensional array of String may return "java.lang.String[][]", and the parameterized type List<Integer> may return "java.util.List<java.lang.Integer>".

        Specified by:
        toString in interface Type
        Overrides:
        toString in class AbstractTypeImpl
        Returns:
        a string representation of the type.
      • typeVarToString

        static java.lang.String typeVarToString​(DocEnv env,
                                                com.sun.tools.javac.code.Type.TypeVar v,
                                                boolean full)
        Deprecated.
        Return the string form of a type variable along with any "extends" clause. Class names are qualified if "full" is true.
      • getBounds

        private static com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> getBounds​(com.sun.tools.javac.code.Type.TypeVar v,
                                                                                              DocEnv env)
        Deprecated.
        Get the bounds of a type variable as listed in the "extends" clause.
      • annotations

        public AnnotationDesc[] annotations()
        Deprecated.
        Get the annotations of this program element. Return an empty array if there are none.
        Specified by:
        annotations in interface TypeVariable
        Returns:
        the annotations of this program element or an empty array if there are none.