JmxBuilderTools (Groovy 5.0.6)

Package: groovy.jmx.builder

## [Groovy] Class JmxBuilderTools

- groovy.jmx.builder.JmxBuilderTools

-     class JmxBuilderTools
      extends Object

  This is a utility class used as a helper for JmxBuilder.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static String` | `ATTRIB_KEY_DEFAULT`
    `static String` | `ATTRIB_KEY_DESC`
    `static String` | `ATTRIB_KEY_DESCRIPTION`
    `static String` | `ATTRIB_KEY_TYPE`
    `static String` | `DEFAULT_DOMAIN`
    `static String` | `DEFAULT_NAME_TYPE`
    `static String` | `DESC_KEY`
    `static String` | `DESC_KEY_DISPLAY_NAME`
    `static String` | `DESC_KEY_EVENT_MESSAGE`
    `static String` | `DESC_KEY_EVENT_NAME`
    `static String` | `DESC_KEY_EVENT_SOURCE`
    `static String` | `DESC_KEY_EVENT_TYPE`
    `static String` | `DESC_KEY_GETMETHOD`
    `static String` | `DESC_KEY_JMX_NAME`
    `static String` | `DESC_KEY_MBEAN_ATTRIBS`
    `static String` | `DESC_KEY_MBEAN_CTORS`
    `static String` | `DESC_KEY_MBEAN_NOTES`
    `static String` | `DESC_KEY_MBEAN_OPS`
    `static String` | `DESC_KEY_MBEAN_RESOURCE`
    `static String` | `DESC_KEY_MBEAN_RESOURCE_TYPE`
    `static String` | `DESC_KEY_NAME`
    `static String` | `DESC_KEY_READABLE`
    `static String` | `DESC_KEY_ROLE`
    `static String` | `DESC_KEY_SETMETHOD`
    `static String` | `DESC_KEY_SIGNATURE`
    `static String` | `DESC_KEY_TYPE`
    `static String` | `DESC_KEY_WRITABLE`
    `static String` | `DESC_VAL_TYPE_ATTRIB`
    `static String` | `DESC_VAL_TYPE_CTOR`
    `static String` | `DESC_VAL_TYPE_GETTER`
    `static String` | `DESC_VAL_TYPE_MBEAN`
    `static String` | `DESC_VAL_TYPE_NOTIFICATION`
    `static String` | `DESC_VAL_TYPE_OP`
    `static String` | `DESC_VAL_TYPE_SETTER`
    `static String` | `EVENT_KEY_CALLBACK`
    `static String` | `EVENT_KEY_CALLBACK_RESULT`
    `static String` | `EVENT_KEY_CONTEXTS`
    `static String` | `EVENT_KEY_ISATTRIB`
    `static String` | `EVENT_KEY_MESSAGE`
    `static String` | `EVENT_KEY_METHOD`
    `static String` | `EVENT_KEY_METHOD_RESULT`
    `static String` | `EVENT_KEY_NAME`
    `static String` | `EVENT_KEY_NODE_TYPE`
    `static String` | `EVENT_KEY_TARGETS`
    `static String` | `EVENT_KEY_TYPE`
    `static String` | `EVENT_VAL_NODETYPE_BROADCASTER`
    `static String` | `EVENT_VAL_NODETYPE_LISTENER`
    `static String` | `JMX_KEY`
    `static String` | `NODE_NAME_ATTRIBS`
    `static String` | `NODE_NAME_ATTRIBUTES`
    `static String` | `NODE_NAME_CONSTRUCTORS`
    `static String` | `NODE_NAME_CTORS`
    `static String` | `NODE_NAME_OPERATIONS`
    `static String` | `NODE_NAME_OPS`
    `static Map` | `PRIMITIVE_TYPES`
    `static Map` | `TYPE_MAP`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `JmxBuilderTools()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static String` | `capitalize(String value)` Capitalize the string passed.
    `` | `static ObjectName` | `getDefaultObjectName(Object obj)` Builds a default ObjectName() instance for a given backing POJO/POGO
    `` | `static MBeanServerConnection` | `getMBeanServer()` Returns an MBeanServerConnection instance.
    `` | `static String` | `getNormalizedType(String type)` Returns the proper type's class name when a short version is provided (i.e.
    `` | `static Class[]` | `getSignatureFromParamInfo(Object params)` Returns method signature (as Class[]) given the meta map that describes the method.
    `` | `static boolean` | `isClassMBean(Class cls)` Tests whether the provided class implements MBean.
    `` | `static GroovyMBean` | `registerMBeanFromMap(String regPolicy, Map metaMap)`
    `` | `static String` | `uncapitalize(String value)` Uncapitalizes a string.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Property Detail

    - #### static String ATTRIB_KEY_DEFAULT

    - #### static String ATTRIB_KEY_DESC

    - #### static String ATTRIB_KEY_DESCRIPTION

    - #### static String ATTRIB_KEY_TYPE

    - #### static String DEFAULT_DOMAIN

    - #### static String DEFAULT_NAME_TYPE

    - #### static String DESC_KEY

    - #### static String DESC_KEY_DISPLAY_NAME

    - #### static String DESC_KEY_EVENT_MESSAGE

    - #### static String DESC_KEY_EVENT_NAME

    - #### static String DESC_KEY_EVENT_SOURCE

    - #### static String DESC_KEY_EVENT_TYPE

    - #### static String DESC_KEY_GETMETHOD

    - #### static String DESC_KEY_JMX_NAME

    - #### static String DESC_KEY_MBEAN_ATTRIBS

    - #### static String DESC_KEY_MBEAN_CTORS

    - #### static String DESC_KEY_MBEAN_NOTES

    - #### static String DESC_KEY_MBEAN_OPS

    - #### static String DESC_KEY_MBEAN_RESOURCE

    - #### static String DESC_KEY_MBEAN_RESOURCE_TYPE

    - #### static String DESC_KEY_NAME

    - #### static String DESC_KEY_READABLE

    - #### static String DESC_KEY_ROLE

    - #### static String DESC_KEY_SETMETHOD

    - #### static String DESC_KEY_SIGNATURE

    - #### static String DESC_KEY_TYPE

    - #### static String DESC_KEY_WRITABLE

    - #### static String DESC_VAL_TYPE_ATTRIB

    - #### static String DESC_VAL_TYPE_CTOR

    - #### static String DESC_VAL_TYPE_GETTER

    - #### static String DESC_VAL_TYPE_MBEAN

    - #### static String DESC_VAL_TYPE_NOTIFICATION

    - #### static String DESC_VAL_TYPE_OP

    - #### static String DESC_VAL_TYPE_SETTER

    - #### static String EVENT_KEY_CALLBACK

    - #### static String EVENT_KEY_CALLBACK_RESULT

    - #### static String EVENT_KEY_CONTEXTS

    - #### static String EVENT_KEY_ISATTRIB

    - #### static String EVENT_KEY_MESSAGE

    - #### static String EVENT_KEY_METHOD

    - #### static String EVENT_KEY_METHOD_RESULT

    - #### static String EVENT_KEY_NAME

    - #### static String EVENT_KEY_NODE_TYPE

    - #### static String EVENT_KEY_TARGETS

    - #### static String EVENT_KEY_TYPE

    - #### static String EVENT_VAL_NODETYPE_BROADCASTER

    - #### static String EVENT_VAL_NODETYPE_LISTENER

    - #### static String JMX_KEY

    - #### static String NODE_NAME_ATTRIBS

    - #### static String NODE_NAME_ATTRIBUTES

    - #### static String NODE_NAME_CONSTRUCTORS

    - #### static String NODE_NAME_CTORS

    - #### static String NODE_NAME_OPERATIONS

    - #### static String NODE_NAME_OPS

    - #### static Map PRIMITIVE_TYPES

    - #### static Map TYPE_MAP

  - ### Constructor Detail

    - #### JmxBuilderTools()

  - ### Method Detail

    - #### static String capitalize(String value)

      Capitalize the string passed.

      Parameters:
        `value` - - string to capitalize.
      Returns:
        - a capitalized string.

    - #### static ObjectName getDefaultObjectName(Object obj)

      Builds a default ObjectName() instance for a given backing POJO/POGO

      Parameters:
        `obj` - - the backing pojo/pogo
      Returns:
        the generated ObjectName() instance.

    - #### static MBeanServerConnection getMBeanServer()

      Returns an MBeanServerConnection instance. It searches for declared MBeanServers from the MBeanServerFactory. If none is found, the default Platform MBeanServer is returned.

    - #### static String getNormalizedType(String type)

      Returns the proper type's class name when a short version is provided (i.e. String returns java.lang.String)

      Parameters:
        `type` - - the type name to normalize
      Returns:
        the normalized type name.

    - #### static Class[] getSignatureFromParamInfo(Object params)

      Returns method signature (as Class[]) given the meta map that describes the method.

      Parameters:
        `params` - - the map with parameter info.
      Returns:
        Class[] that represent the method signature.

    - #### static boolean isClassMBean(Class cls)

      Tests whether the provided class implements MBean. It uses the following runes

           if(
               DynamicMBean.class.isAssignable(cls) ||
               cls.getName().endsWith("MBean") ||
               cls.getName().endsWith("MXBean")
           ) then class is MBean

      Parameters:
        `cls` - - class to test
      Returns:
        true = if class implements DynamicMBean or interface name that ends in MBean or MXBean.

    - #### static GroovyMBean registerMBeanFromMap(String regPolicy, Map metaMap)

    - #### static String uncapitalize(String value)

      Uncapitalizes a string.

      Parameters:
        `value` - - string to uncap.
      Returns:
        uncap'ed string.