All public methods take an Object argument that either is the immediate object, such as Boolean, Type, interface implementation, or an Any that contains an object.
The methods which extract the value do a widening conversion. See the method comments for the respective conversions.
| Modifier and Type | Field and Description |
|---|---|
| private static final Type |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | containsType(com.
Examines the argument object if is correspond to the type in argument what. |
| private static Object | |
| public static Type | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static Object | |
| public static boolean | |
| public static byte | |
| public static char | |
| public static double | |
| public static float | |
| public static int | |
| public static long | |
| public static Object | |
| public static Object | |
| public static short | |
| public static String | |
| public static Type | |
| public static int | Returns: an (unsigned) int.the object to convert. object)Converts a number object into an idl unsigned long and allows widening conversions. |
| public static long | Returns: an (unsigned) long.the object to convert. object)Converts a number object into an idl unsigned hyper and allows widening conversions. |
| public static short | Returns: an (unsigned) short.the object to convert. object)Converts a number object into an idl unsigned short and allows widening conversions. |
| m_XInterface_type | back to summary |
|---|---|
| private static final Type m_XInterface_type | |
| AnyConverter | back to summary |
|---|---|
| public AnyConverter() | |
| containsType | back to summary |
|---|---|
| private static boolean containsType(com. Examines the argument object if is correspond to the type in argument what. object is either matched directly against the type or if it is an any then the contained object is matched against the type. | |
| convertSimple | back to summary |
|---|---|
| private static Object convertSimple(com. | |
| getType | back to summary |
|---|---|
| public static Type getType(Object object) Determines the type of an Any object. | |
| isArray | back to summary |
|---|---|
| public static boolean isArray(Object object) Checks if the any contains UNO idl sequence value (meaning a java array containing elements which are values of UNO idl types).
| |
| isBoolean | back to summary |
|---|---|
| public static boolean isBoolean(Object object) Checks if the any contains a value of the idl type
| |
| isByte | back to summary |
|---|---|
| public static boolean isByte(Object object) Checks if the any contains a value of the idl type
| |
| isChar | back to summary |
|---|---|
| public static boolean isChar(Object object) Checks if the any contains a value of the idl type
| |
| isDouble | back to summary |
|---|---|
| public static boolean isDouble(Object object) Checks if the any contains a value of the idl type
| |
| isEnum | back to summary |
|---|---|
| public static boolean isEnum(Object object) Checks if the any contains a value of the idl type
| |
| isFloat | back to summary |
|---|---|
| public static boolean isFloat(Object object) Checks if the any contains a value of the idl type
| |
| isInt | back to summary |
|---|---|
| public static boolean isInt(Object object) Checks if the any contains a value of the idl type
| |
| isLong | back to summary |
|---|---|
| public static boolean isLong(Object object) Checks if the any contains a value of the idl type
| |
| isObject | back to summary |
|---|---|
| public static boolean isObject(Object object) Checks if the any contains an interface, struct, exception, sequence or enum. If object is an any with an interface type, then true is also returned if the any contains a null reference. This is because interfaces are allowed to have a null value contrary to other UNO types.
| |
| isShort | back to summary |
|---|---|
| public static boolean isShort(Object object) Checks if the any contains a value of the idl type
| |
| isString | back to summary |
|---|---|
| public static boolean isString(Object object) Checks if the any contains a value of the idl type
| |
| isType | back to summary |
|---|---|
| public static boolean isType(Object object) Checks if the any contains a value of the idl type
| |
| isVoid | back to summary |
|---|---|
| public static boolean isVoid(Object object) Checks if the any contains the idl type
| |
| toArray | back to summary |
|---|---|
| public static Object toArray(Object object) throws com.sun.star.lang.IllegalArgumentException Converts an array or an any containing an array into an array.
| |
| toBoolean | back to summary |
|---|---|
| public static boolean toBoolean(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a Boolean object or an Any object containing a Boolean object into a simple boolean.
| |
| toByte | back to summary |
|---|---|
| public static byte toByte(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a Byte object or an Any object containing a Byte object into a simple byte.
| |
| toChar | back to summary |
|---|---|
| public static char toChar(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a Char object or an Any object containing a Char object into a simple char.
| |
| toDouble | back to summary |
|---|---|
| public static double toDouble(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into a simple double and allows widening conversions. Allowed argument types are Byte, Short, Int, Float, Double or Any containing these types.
| |
| toFloat | back to summary |
|---|---|
| public static float toFloat(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into a simple float and allows widening conversions. Allowed argument types are Byte, Short, Float or Any containing these types.
| |
| toInt | back to summary |
|---|---|
| public static int toInt(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into a simple int and allows widening conversions. Allowed argument types are Byte, Short, Integer or Any containing these types.
| |
| toLong | back to summary |
|---|---|
| public static long toLong(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into a simple long and allows widening conversions. Allowed argument types are Byte, Short, Integer, Long or Any containing these types.
| |
| toObject | back to summary |
|---|---|
| public static Object toObject(Type type, Object object) throws com.sun.star.lang.IllegalArgumentException Converts a UNO object (struct, exception, sequence, enum or interface) or an Any containing these types into a UNO object of a specified destination type. For interfaces, the argument object is queried for the interface specified by the type argument. That query (UnoRuntime.queryInterface) might return null, if the interface is not implemented or a null-ref or a VOID any is given.
| |
| toObject | back to summary |
|---|---|
| public static Object toObject(Class<?> clazz, Object object) throws com.sun.star.lang.IllegalArgumentException Converts a UNO object (struct, exception, sequence, enum or interface) or an Any containing these types into a UNO object of a specified destination type. For interfaces, the argument object is queried for the interface specified by the type argument. That query (UnoRuntime.queryInterface) might return null, if the interface is not implemented or a null-ref or a VOID any is given.
| |
| toShort | back to summary |
|---|---|
| public static short toShort(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into a simple short and allows widening conversions. Allowed argument types are Byte, Short or Any containing these types.
| |
| toString | back to summary |
|---|---|
| public static String toString(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a string or an any containing a string into a string.
| |
| toType | back to summary |
|---|---|
| public static Type toType(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a Type or an any containing a Type into a Type.
| |
| toUnsignedInt | back to summary |
|---|---|
| public static int toUnsignedInt(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into an idl unsigned long and allows widening conversions. Allowed argument types are Anies containing idl unsigned short or unsigned long values.
| |
| toUnsignedLong | back to summary |
|---|---|
| public static long toUnsignedLong(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into an idl unsigned hyper and allows widening conversions. Allowed argument types are Anies containing idl unsigned short, unsigned long or unsigned hyper values.
| |
| toUnsignedShort | back to summary |
|---|---|
| public static short toUnsignedShort(Object object) throws com.sun.star.lang.IllegalArgumentException Converts a number object into an idl unsigned short and allows widening conversions. Allowed argument types are Anies containing idl unsigned short values.
| |