org.jboss.mx.server
Class MethodMapper

java.lang.Object
  extended byorg.jboss.mx.server.MethodMapper

public class MethodMapper
extends java.lang.Object

Helper class for resolving JMX *Info objects against Method objects. It's typically used during the construction of dispatchers during MBean registration/creation.


Constructor Summary
MethodMapper(java.lang.Class resourceClass)
          Constructs a mapper by reflecting on the class.
 
Method Summary
protected  java.util.HashMap createMap(java.lang.Class resourceClass)
          creates the signature string to Method HashMap.
static java.lang.String getterSignature(MBeanAttributeInfo (src)  info)
          Generates a signature string for an attribute getter method using standard rules
 java.lang.reflect.Method lookupGetter(MBeanAttributeInfo (src)  info)
          Return a method matching the getter signature expected for an attribute.
 java.lang.reflect.Method lookupMethod(java.lang.String returnType, java.lang.String name, java.lang.String[] signature)
          Return a method matching the specified signature
 java.lang.reflect.Method lookupOperation(MBeanOperationInfo (src)  info)
          Return a method matching the signature defined in the operation info
 java.lang.reflect.Method lookupOperation(MBeanOperationInfo (src)  info, java.lang.Object mbean)
          Used to see if a ModelMBean has the operation in question.
 java.lang.reflect.Method lookupSetter(MBeanAttributeInfo (src)  info)
          Return a method matching the setter signature expected for an attribute
static java.lang.String methodSignature(java.lang.reflect.Method method)
          Generates a signature string using a Method object.
static java.lang.String methodSignature(java.lang.String returnType, java.lang.String name, java.lang.String[] signature)
          Generates a signature string using the supplied signature arguments.
static java.lang.String operationSignature(MBeanOperationInfo (src)  info)
          Generates a signature string using the operation info.
static java.lang.String setterSignature(MBeanAttributeInfo (src)  info)
          Generates a signature string for an attribute setter method using standard rules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodMapper

public MethodMapper(java.lang.Class resourceClass)
Constructs a mapper by reflecting on the class.

Method Detail

getterSignature

public static java.lang.String getterSignature(MBeanAttributeInfo (src)  info)
Generates a signature string for an attribute getter method using standard rules


setterSignature

public static java.lang.String setterSignature(MBeanAttributeInfo (src)  info)
Generates a signature string for an attribute setter method using standard rules


operationSignature

public static java.lang.String operationSignature(MBeanOperationInfo (src)  info)
Generates a signature string using the operation info.


methodSignature

public static java.lang.String methodSignature(java.lang.reflect.Method method)
Generates a signature string using a Method object.


methodSignature

public static java.lang.String methodSignature(java.lang.String returnType,
                                               java.lang.String name,
                                               java.lang.String[] signature)
Generates a signature string using the supplied signature arguments.


lookupOperation

public java.lang.reflect.Method lookupOperation(MBeanOperationInfo (src)  info)
Return a method matching the signature defined in the operation info


lookupOperation

public java.lang.reflect.Method lookupOperation(MBeanOperationInfo (src)  info,
                                                java.lang.Object mbean)
Used to see if a ModelMBean has the operation in question.

Parameters:
info -
mbean -
Returns:
The mbean method if found, null otherwise

lookupGetter

public java.lang.reflect.Method lookupGetter(MBeanAttributeInfo (src)  info)
Return a method matching the getter signature expected for an attribute.


lookupSetter

public java.lang.reflect.Method lookupSetter(MBeanAttributeInfo (src)  info)
Return a method matching the setter signature expected for an attribute


lookupMethod

public java.lang.reflect.Method lookupMethod(java.lang.String returnType,
                                             java.lang.String name,
                                             java.lang.String[] signature)
Return a method matching the specified signature


createMap

protected java.util.HashMap createMap(java.lang.Class resourceClass)
creates the signature string to Method HashMap.