Groovy 1.7.2

groovy.jmx.builder
Class JmxBuilderTools

java.lang.Object
  groovy.jmx.builder.JmxBuilderTools

public class JmxBuilderTools
extends Object

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

author:
Vladimir Vivien


Method Summary
static String capitalize(String value)

Capitalize the string passed.

static ObjectName getDefaultObjectName(def 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(def 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.

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Method Detail

capitalize

public static String capitalize(String value)
Capitalize the string passed.
param:
value - string to capitalize.
return:
- a capitalized string.


getDefaultObjectName

public static ObjectName getDefaultObjectName(def obj)
Builds a default ObjectName() instance for a given backing POJO/POGO
param:
obj - the backing pojo/pogo
return:
the generated ObjectName() instance.


getMBeanServer

public 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.


getNormalizedType

public 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)
param:
type - the type name to normalize
return:
the normalized type name.


getSignatureFromParamInfo

public static Class[] getSignatureFromParamInfo(def params)
Returns method signature (as Class[]) given the meta map that describes the method.
param:
params - the map with parameter info.
return:
Class[] that represent the method signature.


isClassMBean

public static boolean isClassMBean(Class cls)
Tests whether the provided class implements MBean. It uses the following runes

 if(
     DyanamicMBean.class.isAssignable(cls) ||
     cls.getName().endsWith("MBean") ||
     cls.getName().endsWith("MXBean")
 ) then class is MBean
 
param:
cls - class to test
return:
true = if class implements DyanmicMBean or interface name that ends in MBean or MXBean.


registerMBeanFromMap

public static GroovyMBean registerMBeanFromMap(String regPolicy, Map metaMap)


uncapitalize

public static String uncapitalize(String value)
Uncapitalizes a string.
param:
value - string to uncap.
return:
uncap'ed string.


 

Copyright © 2003-2010 The Codehaus. All rights reserved.