Class TypeMaker.ArrayTypeImpl
java.lang.Object
gw.gosudoc.com.sun.tools.javadoc.main.TypeMaker.ArrayTypeImpl
- All Implemented Interfaces:
Type
- Enclosing class:
- TypeMaker
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn null, as there are no annotations of the typeReturn this type as anAnnotationTypeDoc
if it represents an annotation type.Return this type as a class.Return this type as aParameterizedType
if it represents a parameterized type.Return this type as aTypeVariable
if it represents a type variable.Return null, as there are no arrays of wildcard types.Return the type's dimension information, as a string.If this type is an array type, return the element type of the array.boolean
Return true if this is an array of a primitive type.Return qualified name of type excluding any dimension information.Return the simple name of this type excluding any dimension information.private Type
toString()
Return a string representation of the type.typeName()
Return unqualified name of type excluding any dimension information.
-
Field Details
-
arrayType
com.sun.tools.javac.code.Type arrayType -
env
DocEnv env -
skipArraysCache
-
-
Constructor Details
-
ArrayTypeImpl
ArrayTypeImpl(DocEnv env, com.sun.tools.javac.code.Type arrayType)
-
-
Method Details
-
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 interfaceType
- Returns:
- a
Type
representing the element type or null.
-
skipArrays
-
dimension
Return the type's dimension information, as a string.For example, a two dimensional array of String returns '[][]'.
-
typeName
Return unqualified name of type excluding any dimension information.For example, a two dimensional array of String returns '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 interfaceType
- Returns:
- qualified name of this type excluding any dimension information.
-
simpleTypeName
Return the simple name of this type excluding any dimension information.- Specified by:
simpleTypeName
in interfaceType
- Returns:
- the simple name of this type excluding any dimension information.
-
asClassDoc
Return this type as a class. Array dimensions are ignored.- Specified by:
asClassDoc
in interfaceType
- Returns:
- a ClassDocImpl if the type is a Class. Return null if it is a primitive type..
-
asParameterizedType
Return this type as aParameterizedType
if it represents a parameterized type. Array dimensions are ignored.- Specified by:
asParameterizedType
in interfaceType
- Returns:
- a
ParameterizedType
if the type is an invocation of a generic type, or null if it is not.
-
asTypeVariable
Return this type as aTypeVariable
if it represents a type variable. Array dimensions are ignored.- Specified by:
asTypeVariable
in interfaceType
- Returns:
- a
TypeVariable
if the type is a type variable, or null if it is not.
-
asWildcardType
Return null, as there are no arrays of wildcard types.- Specified by:
asWildcardType
in interfaceType
- Returns:
- a
WildcardType
if the type is a wildcard type, or null if it is not.
-
asAnnotatedType
Return null, as there are no annotations of the type- Specified by:
asAnnotatedType
in interfaceType
- Returns:
- a
AnnotatedType
if the type if an annotated type, or null if it is not
-
asAnnotationTypeDoc
Return this type as anAnnotationTypeDoc
if it represents an annotation type. Array dimensions are ignored.- Specified by:
asAnnotationTypeDoc
in interfaceType
- 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 interfaceType
- Returns:
- true if this type represents a primitive type.
-
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[][]
.
-