org.jboss.mx.metadata
Class MethodMapper

java.lang.Object
  extended byorg.jboss.mx.metadata.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. If you're looking for a fast resolver of JMX operation signatures see AttributeOperationResolver. FIXME - this class is not aware of multiple target objects (as in modelmbeans) however I'm half expecting that feature to disappear in JMX 1.1 anyhow.


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
static java.lang.String getterSignature(ModelMBeanAttributeInfo (src)  info)
          Generates a getter signature string for a ModelMBean attribute by checking the descriptor for getMethod.
 java.lang.reflect.Method lookupGetter(MBeanAttributeInfo (src)  info)
          Return a method matching the getter signature expected for an attribute.
 java.lang.reflect.Method lookupGetter(ModelMBeanAttributeInfo (src)  info)
          Return a method matching the getter signature expected for a ModelMBean 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 lookupSetter(MBeanAttributeInfo (src)  info)
          Return a method matching the setter signature expected for an attribute
 java.lang.reflect.Method lookupSetter(ModelMBeanAttributeInfo (src)  info)
          Return a method matching the setter signature expected for a ModelMBean 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
static java.lang.String setterSignature(ModelMBeanAttributeInfo (src)  info)
          Generates a setter signature string for a ModelMBean attribute by checking the descriptor for setMethod.
 
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

lookupOperation

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


lookupGetter

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


lookupGetter

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


lookupSetter

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


lookupSetter

public java.lang.reflect.Method lookupSetter(ModelMBeanAttributeInfo (src)  info)
Return a method matching the setter signature expected for a ModelMBean 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


getterSignature

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


getterSignature

public static java.lang.String getterSignature(ModelMBeanAttributeInfo (src)  info)
Generates a getter signature string for a ModelMBean attribute by checking the descriptor for getMethod.


setterSignature

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


setterSignature

public static java.lang.String setterSignature(ModelMBeanAttributeInfo (src)  info)
Generates a setter signature string for a ModelMBean attribute by checking the descriptor for setMethod.


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.


createMap

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