public final class TypeDescription extends java.lang.Object implements ITypeDescription
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getArrayTypeName()
Gets the (Java) array type name.
|
ITypeDescription |
getComponentType()
Gets the component
ITypeDescription if
this is an array type, otherwise returns null. |
IFieldDescription |
getFieldDescription(java.lang.String name)
Gets the
IFieldDescription for the
field with the name name, if it exists,
otherwise returns null. |
IFieldDescription[] |
getFieldDescriptions()
Gets the
IFieldDescription for every
field, if this type is an interface. |
IMethodDescription |
getMethodDescription(int methodId)
Gets the
IMethodDescription for the
method with index methodId, if it exists, otherwise
returns null. |
IMethodDescription |
getMethodDescription(java.lang.String name)
Gets the
IMethodDescription for the
method with the name name, if it exists,
otherwise returns null. |
IMethodDescription[] |
getMethodDescriptions()
Gets the
IMethodDescription for every
method, if this type is an interface. |
ITypeDescription |
getSuperType()
Gets the
ITypeDescription of the
super, if it exists. |
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(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(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(TypeClass typeClass)
public static boolean isTypeClassSimple(TypeClass typeClass)
public ITypeDescription getSuperType()
ITypeDescriptionITypeDescription of the
super, if it exists.
getSuperType in interface ITypeDescriptionITypeDescription.public IMethodDescription[] getMethodDescriptions()
ITypeDescriptionIMethodDescription for every
method, if this type is an interface. Otherwise
returns null.
getMethodDescriptions in interface ITypeDescriptionIMethodDescription[].public IMethodDescription getMethodDescription(int methodId)
ITypeDescriptionIMethodDescription for the
method with index methodId, if it exists, otherwise
returns null.
getMethodDescription in interface ITypeDescriptionIMethodDescription.public IMethodDescription getMethodDescription(java.lang.String name)
ITypeDescriptionIMethodDescription for the
method with the name name, if it exists,
otherwise returns null.
getMethodDescription in interface ITypeDescriptionIMethodDescription.public IFieldDescription[] getFieldDescriptions()
ITypeDescriptionIFieldDescription for every
field, if this type is an interface. Otherwise
returns null.
getFieldDescriptions in interface ITypeDescriptionIFieldDescription[].public IFieldDescription getFieldDescription(java.lang.String name)
ITypeDescriptionIFieldDescription for the
field with the name name, if it exists,
otherwise returns null.
getFieldDescription in interface ITypeDescriptionIFieldDescription.public TypeClass getTypeClass()
ITypeDescriptionTypeClass of the type.
getTypeClass in interface ITypeDescriptionTypeClass.public ITypeDescription getComponentType()
ITypeDescriptionITypeDescription if
this is an array type, otherwise returns null.
getComponentType in interface ITypeDescriptionITypeDescriptionpublic java.lang.String getTypeName()
ITypeDescriptionThe following table lists how UNO types map to type names:
| 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 | |
| UNSIGNED HYPER | |
| FLOAT | |
| DOUBLE | |
| STRING | |
| TYPE | |
| 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 "."
seperating the individual elements.
getTypeName in interface ITypeDescriptionpublic java.lang.String getArrayTypeName()
ITypeDescriptionThe 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
ITypeDescription instance) as base type. For an
ITypeDescription instance representing the UNO type VOID,
the array type name is defined to be
"[Ljava.lang.Void;".
getArrayTypeName in interface ITypeDescriptionpublic java.lang.Class getZClass()
ITypeDescriptiongetZClass in interface ITypeDescriptionpublic boolean hasTypeArguments()
public java.lang.String toString()
toString in class java.lang.Object