public final class TypeDescription
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getArrayTypeName()
Gets the (Java) array type name.
|
TypeDescription |
getComponentType()
Gets the component
TypeDescription if
this is an array type, otherwise returns null. |
FieldDescription |
getFieldDescription(java.lang.String name)
Gets the
FieldDescription for the
field with the name name, if it exists,
otherwise returns null. |
FieldDescription[] |
getFieldDescriptions()
Gets the
FieldDescription for every
field, if this type is an interface. |
MethodDescription |
getMethodDescription(int methodId)
Gets the
MethodDescription for the
method with index methodId, if it exists, otherwise
returns null. |
MethodDescription |
getMethodDescription(java.lang.String name)
Gets the
MethodDescription for the
method with the name name, if it exists,
otherwise returns null. |
MethodDescription[] |
getMethodDescriptions()
Gets the
MethodDescription for every
method, if this type is an interface. |
TypeDescription |
getSuperType()
Gets the
TypeDescription of the
super, if it exists. |
com.sun.star.uno.TypeClass |
getTypeClass()
Gets the IDL
TypeClass of the type. |
static TypeDescription |
getTypeDescription(java.lang.Class<?> zClass) |
static TypeDescription |
getTypeDescription(java.lang.String typeName) |
static TypeDescription |
getTypeDescription(Type type) |
static TypeDescription |
getTypeDescription(com.sun.star.uno.TypeClass typeClass) |
java.lang.String |
getTypeName()
Gets the (UNO) type name.
|
java.lang.Class<?> |
getZClass()
Gets the corresponding java class for the type.
|
boolean |
hasTypeArguments() |
static boolean |
isTypeClassSimple(com.sun.star.uno.TypeClass typeClass) |
java.lang.String |
toString() |
public static TypeDescription getTypeDescription(java.lang.String typeName) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic static TypeDescription getTypeDescription(java.lang.Class<?> zClass)
public static TypeDescription getTypeDescription(Type type) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic static TypeDescription getTypeDescription(com.sun.star.uno.TypeClass typeClass)
public static boolean isTypeClassSimple(com.sun.star.uno.TypeClass typeClass)
public TypeDescription getSuperType()
TypeDescription of the
super, if it exists.TypeDescription.public MethodDescription[] getMethodDescriptions()
MethodDescription for every
method, if this type is an interface. Otherwise
returns null.MethodDescription[].public MethodDescription getMethodDescription(int methodId)
MethodDescription for the
method with index methodId, if it exists, otherwise
returns null.methodId - the index.MethodDescription.public MethodDescription getMethodDescription(java.lang.String name)
MethodDescription for the
method with the name name, if it exists,
otherwise returns null.name - the name of the method.MethodDescription.public FieldDescription[] getFieldDescriptions()
FieldDescription for every
field, if this type is an interface. Otherwise
returns null.FieldDescription[].public FieldDescription getFieldDescription(java.lang.String name)
FieldDescription for the
field with the name name, if it exists,
otherwise returns null.name - the name of the field.FieldDescription.public com.sun.star.uno.TypeClass getTypeClass()
TypeClass of the type.TypeClass.public TypeDescription getComponentType()
TypeDescription if
this is an array type, otherwise returns null.TypeDescriptionpublic java.lang.String getTypeName()
| UNO type | type name |
|---|---|
| VOID | "void" |
| BOOLEAN | "boolean" |
| CHAR | "char" |
| BYTE | "byte" |
| SHORT | "short" |
| UNSIGNED SHORT | "unsigned short" |
| LONG | "long" |
| UNSIGNED LONG | "unsigned long" |
| HYPER | "hyper" |
| UNSIGNED HYPER | "unsigned hyper" |
| FLOAT | "float" |
| DOUBLE | "double" |
| STRING | "string" |
| TYPE | "type" |
| ANY | "any" |
| sequence type of base type T | "[]" followed by type name for T |
| enum type named N | N (see below) |
| struct type named N | N (see below) |
| exception type named N | N (see below) |
| interface type named N | N (see below) |
For a UNO type named N, consisting of a sequence of module
names M1, ..., Mn followed by
a simple name S, the corresponding type name consists of the
same sequence of module names and simple name, with "."
separating the individual elements.
public java.lang.String getArrayTypeName()
The array type name is defined to be the Java class name (as returned
by Class.forName) of the Java array class that corresponds
to the UNO sequence type with this type (the UNO type represented by this
TypeDescription instance) as base type. For an
TypeDescription instance representing the UNO type VOID,
the array type name is defined to be
"[Ljava.lang.Void;".
public java.lang.Class<?> getZClass()
public boolean hasTypeArguments()
public java.lang.String toString()
toString in class java.lang.Object