Class TypeMaker.ArrayTypeImpl
- java.lang.Object
-
- gw.gosudoc.com.sun.tools.javadoc.main.TypeMaker.ArrayTypeImpl
-
-
Field Summary
Fields Modifier and Type Field Description (package private) com.sun.tools.javac.code.TypearrayType(package private) DocEnvenvprivate TypeskipArraysCache
-
Constructor Summary
Constructors Constructor Description ArrayTypeImpl(DocEnv env, com.sun.tools.javac.code.Type arrayType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotatedTypeasAnnotatedType()Return null, as there are no annotations of the typeAnnotationTypeDocasAnnotationTypeDoc()Return this type as anAnnotationTypeDocif it represents an annotation type.ClassDocasClassDoc()Return this type as a class.ParameterizedTypeasParameterizedType()Return this type as aParameterizedTypeif it represents a parameterized type.TypeVariableasTypeVariable()Return this type as aTypeVariableif it represents a type variable.WildcardTypeasWildcardType()Return null, as there are no arrays of wildcard types.java.lang.Stringdimension()Return the type's dimension information, as a string.TypegetElementType()If this type is an array type, return the element type of the array.booleanisPrimitive()Return true if this is an array of a primitive type.java.lang.StringqualifiedTypeName()Return qualified name of type excluding any dimension information.java.lang.StringsimpleTypeName()Return the simple name of this type excluding any dimension information.private TypeskipArrays()java.lang.StringtoString()Return a string representation of the type.java.lang.StringtypeName()Return unqualified name of type excluding any dimension information.
-
-
-
Constructor Detail
-
ArrayTypeImpl
ArrayTypeImpl(DocEnv env, com.sun.tools.javac.code.Type arrayType)
-
-
Method Detail
-
getElementType
public Type getElementType()
Description copied from interface:TypeIf this type is an array type, return the element type of the array. Otherwise, return null.- Specified by:
getElementTypein interfaceType- Returns:
- a
Typerepresenting the element type or null.
-
skipArrays
private Type skipArrays()
-
dimension
public java.lang.String dimension()
Return the type's dimension information, as a string.For example, a two dimensional array of String returns '[][]'.
-
typeName
public java.lang.String typeName()
Return unqualified name of type excluding any dimension information.For example, a two dimensional array of String returns 'String'.
-
qualifiedTypeName
public java.lang.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:
qualifiedTypeNamein interfaceType- Returns:
- qualified name of this type excluding any dimension information.
-
simpleTypeName
public java.lang.String simpleTypeName()
Return the simple name of this type excluding any dimension information.- Specified by:
simpleTypeNamein interfaceType- 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:
asClassDocin interfaceType- 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 aParameterizedTypeif it represents a parameterized type. Array dimensions are ignored.- Specified by:
asParameterizedTypein interfaceType- Returns:
- a
ParameterizedTypeif the type is an invocation of a generic type, or null if it is not.
-
asTypeVariable
public TypeVariable asTypeVariable()
Return this type as aTypeVariableif it represents a type variable. Array dimensions are ignored.- Specified by:
asTypeVariablein interfaceType- Returns:
- a
TypeVariableif 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:
asWildcardTypein interfaceType- Returns:
- a
WildcardTypeif 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:
asAnnotatedTypein interfaceType- Returns:
- a
AnnotatedTypeif the type if an annotated type, or null if it is not
-
asAnnotationTypeDoc
public AnnotationTypeDoc asAnnotationTypeDoc()
Return this type as anAnnotationTypeDocif it represents an annotation type. Array dimensions are ignored.- Specified by:
asAnnotationTypeDocin interfaceType- Returns:
- an
AnnotationTypeDocif 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:
isPrimitivein interfaceType- Returns:
- true if this type represents a primitive type.
-
toString
public java.lang.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[][].
-
-