Class TypeMaker.ArrayTypeImpl

java.lang.Object
gw.gosudoc.com.sun.tools.javadoc.main.TypeMaker.ArrayTypeImpl
All Implemented Interfaces:
Type
Enclosing class:
TypeMaker

private static class TypeMaker.ArrayTypeImpl extends Object implements Type
  • Field Details

    • arrayType

      com.sun.tools.javac.code.Type arrayType
    • env

      DocEnv env
    • skipArraysCache

      private Type skipArraysCache
  • Constructor Details

    • ArrayTypeImpl

      ArrayTypeImpl(DocEnv env, com.sun.tools.javac.code.Type arrayType)
  • Method Details

    • getElementType

      public Type getElementType()
      Description copied from interface: Type
      If this type is an array type, return the element type of the array. Otherwise, return null.
      Specified by:
      getElementType in interface Type
      Returns:
      a Type representing the element type or null.
    • skipArrays

      private Type skipArrays()
    • dimension

      public String dimension()
      Return the type's dimension information, as a string.

      For example, a two dimensional array of String returns '[][]'.

      Specified by:
      dimension in interface Type
      Returns:
      the type's dimension information as a string.
    • typeName

      public String typeName()
      Return unqualified name of type excluding any dimension information.

      For example, a two dimensional array of String returns 'String'.

      Specified by:
      typeName in interface Type
      Returns:
      unqualified name of type excluding any dimension information.
    • qualifiedTypeName

      public String qualifiedTypeName()
      Return qualified name of type excluding any dimension information.

      For example, a two dimensional array of String returns 'java.lang.String'.

      Specified by:
      qualifiedTypeName in interface Type
      Returns:
      qualified name of this type excluding any dimension information.
    • simpleTypeName

      public String simpleTypeName()
      Return the simple name of this type excluding any dimension information.
      Specified by:
      simpleTypeName in interface Type
      Returns:
      the simple name of this type excluding any dimension information.
    • asClassDoc

      public ClassDoc asClassDoc()
      Return this type as a class. Array dimensions are ignored.
      Specified by:
      asClassDoc in interface Type
      Returns:
      a ClassDocImpl if the type is a Class. Return null if it is a primitive type..
    • asParameterizedType

      public ParameterizedType asParameterizedType()
      Return this type as a ParameterizedType if it represents a parameterized type. Array dimensions are ignored.
      Specified by:
      asParameterizedType in interface Type
      Returns:
      a ParameterizedType if the type is an invocation of a generic type, or null if it is not.
    • asTypeVariable

      public TypeVariable asTypeVariable()
      Return this type as a TypeVariable if it represents a type variable. Array dimensions are ignored.
      Specified by:
      asTypeVariable in interface Type
      Returns:
      a TypeVariable if the type is a type variable, or null if it is not.
    • asWildcardType

      public WildcardType asWildcardType()
      Return null, as there are no arrays of wildcard types.
      Specified by:
      asWildcardType in interface Type
      Returns:
      a WildcardType if the type is a wildcard type, or null if it is not.
    • asAnnotatedType

      public AnnotatedType asAnnotatedType()
      Return null, as there are no annotations of the type
      Specified by:
      asAnnotatedType in interface Type
      Returns:
      a AnnotatedType if the type if an annotated type, or null if it is not
    • asAnnotationTypeDoc

      public AnnotationTypeDoc asAnnotationTypeDoc()
      Return this type as an AnnotationTypeDoc if it represents an annotation type. Array dimensions are ignored.
      Specified by:
      asAnnotationTypeDoc in interface Type
      Returns:
      an AnnotationTypeDoc if the type is an annotation type, or null if it is not.
    • isPrimitive

      public boolean isPrimitive()
      Return true if this is an array of a primitive type.
      Specified by:
      isPrimitive in interface Type
      Returns:
      true if this type represents a primitive type.
    • toString

      public String toString()
      Return a string representation of the type. Return name of type including any dimension information.

      For example, a two dimensional array of String returns String[][].

      Specified by:
      toString in interface Type
      Overrides:
      toString in class Object
      Returns:
      name of type including any dimension information.