Package com.sun.star.lib.uno.typedesc
Class TypeDescription
java.lang.Object
com.sun.star.lib.uno.typedesc.TypeDescription
Supplies information about UNO types. Allows to examine a type
in detail (e.g. it is used for marshaling/unmarshaling).
- Since:
- UDK2.0
-
Method Summary
Modifier and TypeMethodDescriptionGets the (Java) array type name.Gets the componentTypeDescription
if this is an array type, otherwise returnsnull
.getFieldDescription
(String name) Gets theFieldDescription
for the field with the namename
, if it exists, otherwise returnsnull
.Gets theFieldDescription
for every field, if this type is an interface.getMethodDescription
(int methodId) Gets theMethodDescription
for the method with index methodId, if it exists, otherwise returnsnull
.getMethodDescription
(String name) Gets theMethodDescription
for the method with the namename
, if it exists, otherwise returnsnull
.Gets theMethodDescription
for every method, if this type is an interface.Gets theTypeDescription
of the super, if it exists.com.sun.star.uno.TypeClass
Gets the IDLTypeClass
of the type.static TypeDescription
getTypeDescription
(Type type) static TypeDescription
getTypeDescription
(com.sun.star.uno.TypeClass typeClass) static TypeDescription
getTypeDescription
(Class<?> zClass) static TypeDescription
getTypeDescription
(String typeName) Gets the (UNO) type name.Class<?>
Gets the corresponding java class for the type.boolean
static boolean
isTypeClassSimple
(com.sun.star.uno.TypeClass typeClass) toString()
-
Method Details
-
getTypeDescription
- Throws:
ClassNotFoundException
-
getTypeDescription
-
getTypeDescription
- Throws:
ClassNotFoundException
-
getTypeDescription
-
isTypeClassSimple
public static boolean isTypeClassSimple(com.sun.star.uno.TypeClass typeClass) -
getSuperType
Gets theTypeDescription
of the super, if it exists.- Returns:
- the
TypeDescription
.
-
getMethodDescriptions
Gets theMethodDescription
for every method, if this type is an interface. Otherwise returnsnull
.- Returns:
- the
MethodDescription[]
.
-
getMethodDescription
Gets theMethodDescription
for the method with index methodId, if it exists, otherwise returnsnull
.- Parameters:
methodId
- the index.- Returns:
- the
MethodDescription
.
-
getMethodDescription
Gets theMethodDescription
for the method with the namename
, if it exists, otherwise returnsnull
.- Parameters:
name
- the name of the method.- Returns:
- the
MethodDescription
.
-
getFieldDescriptions
Gets theFieldDescription
for every field, if this type is an interface. Otherwise returnsnull
.- Returns:
- the
FieldDescription[]
.
-
getFieldDescription
Gets theFieldDescription
for the field with the namename
, if it exists, otherwise returnsnull
.- Parameters:
name
- the name of the field.- Returns:
- the
FieldDescription
.
-
getTypeClass
public com.sun.star.uno.TypeClass getTypeClass()Gets the IDLTypeClass
of the type.- Returns:
- the
TypeClass
.
-
getComponentType
Gets the componentTypeDescription
if this is an array type, otherwise returnsnull
.- Returns:
- the
TypeDescription
-
getTypeName
Gets the (UNO) type name.Mapping from UNO types 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 "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 Tenum 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.- Returns:
- the type name.
-
getArrayTypeName
Gets the (Java) array type name.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 thisTypeDescription
instance) as base type. For anTypeDescription
instance representing the UNO type VOID, the array type name is defined to be"[Ljava.lang.Void;"
.- Returns:
- the array type name.
-
getZClass
Gets the corresponding java class for the type.- Returns:
- the corresponding java class.
-
hasTypeArguments
public boolean hasTypeArguments() -
toString
-