public interface JavaType extends TrustedInterface
void, and
arrays thereof.| Modifier and Type | Method and Description |
|---|---|
JavaType |
getArrayClass()
Gets the array class type representing an array with elements of this type.
|
JavaType |
getComponentType()
For array types, gets the type of the components, or
null if this is not an array
type. |
default JavaType |
getElementalType()
Gets the elemental type for this given type.
|
Kind |
getKind()
Gets the kind of this type.
|
String |
getName()
Returns the name of this type in internal form.
|
default String |
getUnqualifiedName()
Returns an unqualified name of this type.
|
ResolvedJavaType |
resolve(ResolvedJavaType accessingClass)
Resolves this type to a
ResolvedJavaType. |
default String |
toClassName()
Returns this type's name in the same format as
Class.getName(). |
default String |
toJavaName()
Gets the Java programming language name for this type.
|
default String |
toJavaName(boolean qualified)
Gets the Java programming language name for this type.
|
String getName()
"Ljava/lang/Object;"
"I"
"[[B"
default String getUnqualifiedName()
"Object"
"Integer"
JavaType getComponentType()
null if this is not an array
type. This method is analogous to Class.getComponentType().default JavaType getElementalType()
int[][][] is
int. A non-array type is its own elemental type.JavaType getArrayClass()
ResolvedJavaType resolve(ResolvedJavaType accessingClass)
ResolvedJavaType.accessingClass - the context of resolution (must not be null)LinkageError - if the resolution failedNullPointerException - if accessingClass is nulldefault String toJavaName()
java.lang.Object
int
boolean[][]
default String toJavaName(boolean qualified)
qualified == true:
java.lang.Object
int
boolean[][]
qualified == false:
Object
int
boolean[][]
qualified - specifies if the package prefix of this type should be included in the
returned namedefault String toClassName()
Class.getName().