Class TypeDescription

java.lang.Object
com.sun.star.lib.uno.typedesc.TypeDescription

public final class TypeDescription extends Object
Supplies information about UNO types. Allows to examine a type in detail (e.g. it is used for marshaling/unmarshaling).
Since:
UDK2.0
  • Method Details

    • getTypeDescription

      public static TypeDescription getTypeDescription(String typeName) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getTypeDescription

      public static TypeDescription getTypeDescription(Class<?> zClass)
    • getTypeDescription

      public static TypeDescription getTypeDescription(Type type) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getTypeDescription

      public static TypeDescription getTypeDescription(com.sun.star.uno.TypeClass typeClass)
    • isTypeClassSimple

      public static boolean isTypeClassSimple(com.sun.star.uno.TypeClass typeClass)
    • getSuperType

      public TypeDescription getSuperType()
      Gets the TypeDescription of the super, if it exists.
      Returns:
      the TypeDescription.
    • getMethodDescriptions

      public MethodDescription[] getMethodDescriptions()
      Gets the MethodDescription for every method, if this type is an interface. Otherwise returns null.
      Returns:
      the MethodDescription[].
    • getMethodDescription

      public MethodDescription getMethodDescription(int methodId)
      Gets the MethodDescription for the method with index methodId, if it exists, otherwise returns null.
      Parameters:
      methodId - the index.
      Returns:
      the MethodDescription.
    • getMethodDescription

      public MethodDescription getMethodDescription(String name)
      Gets the MethodDescription for the method with the name name, if it exists, otherwise returns null.
      Parameters:
      name - the name of the method.
      Returns:
      the MethodDescription.
    • getFieldDescriptions

      public FieldDescription[] getFieldDescriptions()
      Gets the FieldDescription for every field, if this type is an interface. Otherwise returns null.
      Returns:
      the FieldDescription[].
    • getFieldDescription

      public FieldDescription getFieldDescription(String name)
      Gets the FieldDescription for the field with the name name, if it exists, otherwise returns null.
      Parameters:
      name - the name of the field.
      Returns:
      the FieldDescription.
    • getTypeClass

      public com.sun.star.uno.TypeClass getTypeClass()
      Gets the IDL TypeClass of the type.
      Returns:
      the TypeClass.
    • getComponentType

      public TypeDescription getComponentType()
      Gets the component TypeDescription if this is an array type, otherwise returns null.
      Returns:
      the TypeDescription
    • getTypeName

      public String getTypeName()
      Gets the (UNO) type name.
      Mapping from UNO types to type names
      UNO typetype 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.

      Returns:
      the type name.
    • getArrayTypeName

      public String 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 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;".

      Returns:
      the array type name.
    • getZClass

      public Class<?> getZClass()
      Gets the corresponding java class for the type.
      Returns:
      the corresponding java class.
    • hasTypeArguments

      public boolean hasTypeArguments()
    • toString

      public String toString()
      Overrides:
      toString in class Object