Interface sun.tools.javadoc.Type
- Implementing Classes:
- ClassDoc
- public interface Type
Represents a java type. Type can be
a class or primitive data type, like int, char...
- Since:
- JDK1.2
Method Summary
|
ClassDoc
|
asClassDoc()
Return this type as a class.
|
java.lang.String
|
dimension()
Return the type's dimension information, as a string.
|
java.lang.String
|
name()
Return unqualified name of type excluding any dimension information.
|
java.lang.String
|
qualifiedName()
Return qualified name of type excluding any dimension information.
|
java.lang.String
|
toString()
Returns a string representation of the type.
|
name
public java.lang.String name()
- Return unqualified name of type excluding any dimension information.
For example, a two dimensional array of String returns 'String'.
qualifiedName
public java.lang.String qualifiedName()
- Return qualified name of type excluding any dimension information.
For example, a two dimensional array of String
returns 'java.lang.String'.
dimension
public java.lang.String dimension()
- Return the type's dimension information, as a string.
For example, a two dimensional array of String returns '[][]'.
toString
public java.lang.String toString()
- Returns a string representation of the type.
Return name of type including any dimension information.
For example, a two dimensional array of String returns
String[][]
.
- Returns:
- name of type including any dimension information.
- Overrides:
- toString in class java.lang.Object
asClassDoc
public ClassDoc asClassDoc()
- Return this type as a class. Array dimensions are ignored.
- Returns:
- a ClassDoc if the type is a Class.
Return null if it is a primitive type..