Class OpenTypeUtils


  • public abstract class OpenTypeUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenTypeUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.management.openmbean.CompositeType createCompositeType​(java.lang.Class<?> clazz)
      Introspects the given class to generate composite type.
      static javax.management.openmbean.OpenType createOpenType​(java.lang.Class<?> clazz, OpenTypeInfo info)
      Introspects the given class to generate open type type.
      static javax.management.openmbean.TabularType createTabularType​(java.lang.Class<?> clazz)
      Introspects the given class to generate tabular type.
      static javax.management.openmbean.SimpleType getSimpleType​(java.lang.Class<?> clazz)
      Returns the simple type for the given class.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OpenTypeUtils

        public OpenTypeUtils()
    • Method Detail

      • createOpenType

        public static javax.management.openmbean.OpenType createOpenType​(java.lang.Class<?> clazz,
                                                                         OpenTypeInfo info)
                                                                  throws javax.management.openmbean.OpenDataException
        Introspects the given class to generate open type type. If the class is CompositeData, TabularData or their respective array then OpenTypeInfo param must not be null.
        Parameters:
        clazz - the class to introspect
        info - the open type info
        Returns:
        the generated open type type
        Throws:
        javax.management.openmbean.OpenDataException - if type is null
      • getSimpleType

        public static javax.management.openmbean.SimpleType getSimpleType​(java.lang.Class<?> clazz)
        Returns the simple type for the given class. If the class is not a simple type then null is returned.
        Parameters:
        clazz - the class
        Returns:
        the simple type for the given class
      • createCompositeType

        public static javax.management.openmbean.CompositeType createCompositeType​(java.lang.Class<?> clazz)
                                                                            throws javax.management.openmbean.OpenDataException
        Introspects the given class to generate composite type.
        Parameters:
        clazz - the class
        Returns:
        the composite type of the given class
        Throws:
        javax.management.openmbean.OpenDataException - when an error happens during inspection
      • createTabularType

        public static javax.management.openmbean.TabularType createTabularType​(java.lang.Class<?> clazz)
                                                                        throws javax.management.openmbean.OpenDataException
        Introspects the given class to generate tabular type. The class must be annotated with TabularTypeInfo.
        Parameters:
        clazz - the class
        Returns:
        the tabular type of the given class
        Throws:
        javax.management.openmbean.OpenDataException - when an error happens