|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jaw.reference.common.MBeanIntrospector
The MBeanIntrospector class provides a way to learn about the properties and actions supported by an m-bean.
For each of those two kinds of information, the MBeanIntrospector will separately analyze the bean's class and superclasses looking for implicit information and use that information to build a MBeanInfo object that comprehensively describes the target bean.
We use low-level reflection to study the methods of the class and apply standard design patterns to identify property accessors or public actions. We then proceed to analyze the class's superclass and add the information from it (and possibly on up the superclass chain). Non-serializable property accessors or public actions are omitted from the information.
Constructor Summary | |
MBeanIntrospector()
|
Method Summary | |
static java.lang.reflect.Constructor |
findConstructor(java.lang.Class theClass,
java.lang.Class[] parameterTypes)
Find a specific constructor of a class |
static java.lang.reflect.Method |
findGetter(java.lang.Class classObj,
java.lang.String property)
Find the getter of a specific property in an object. |
static java.lang.reflect.Method |
findIndexedGetter(java.lang.Class classObj,
java.lang.String property)
Find the getter of a specific property in an object. |
static java.lang.reflect.Method |
findIndexedSetter(java.lang.Class classObj,
java.lang.String property)
Finds the setter of a specific indexed property without knowing its type. |
static java.lang.reflect.Method |
findIndexedSetter(java.lang.Class classObj,
java.lang.String property,
java.lang.Class type)
Find the setter of a specific indexed property in an object. |
static java.lang.String[] |
findListOfActions(java.lang.Class targetClass,
boolean flat)
Finds the list of actions available in a specific class. |
static java.lang.String[] |
findListOfProperties(java.lang.Class targetClass,
boolean flat)
Finds the list of properties available in a specific class. |
static java.lang.reflect.Method |
findMethod(java.lang.Class classObj,
java.lang.String name)
Find a specific method of an object without knowing the parameter types. |
static java.lang.reflect.Method |
findMethod(java.lang.Class classObj,
java.lang.String name,
java.lang.Class[] parameterTypes)
Find a specific method of an object |
protected static java.lang.reflect.Method |
findMethod(java.lang.Class classObj,
java.lang.String name,
int paramCount)
Find a specific method of an object given the number of parameters. |
static java.lang.reflect.Method |
findPerform(java.lang.Class classObj,
java.lang.String name,
java.lang.Class[] parametersType)
Find a specify perform method from the method name |
static java.lang.reflect.Method |
findSetter(java.lang.Class classObj,
java.lang.String property)
Find the setter of a specific property without knowing its type. |
static java.lang.reflect.Method |
findSetter(java.lang.Class classObj,
java.lang.String property,
java.lang.Class type)
Find the setter of a specific property in an object. |
static void |
flushCaches()
Flush all the internal caches. |
static void |
flushFromCaches(java.lang.Class clz)
Flush the internal cached information for a given class. |
static MBeanInfo |
getMBeanInfo(java.lang.Class beanClass)
Introspect a m-bean and learn about all its properties and actions. |
static MBeanInfo |
getMBeanInfo(java.lang.Class beanClass,
java.lang.Class stopClass)
Introspect a m-bean and learn about all its properties and actions. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MBeanIntrospector()
Method Detail |
public static MBeanInfo getMBeanInfo(java.lang.Class beanClass) throws java.beans.IntrospectionException
beanClass
- The bean class to be analyzed.public static MBeanInfo getMBeanInfo(java.lang.Class beanClass, java.lang.Class stopClass) throws java.beans.IntrospectionException
beanClass
- The bean class to be analyzed.stopClass
- The baseclass at which to stop the analysis.public static void flushCaches()
public static void flushFromCaches(java.lang.Class clz)
public static java.lang.String[] findListOfProperties(java.lang.Class targetClass, boolean flat)
When flat is false inherited properties are not returned.
public static java.lang.String[] findListOfActions(java.lang.Class targetClass, boolean flat)
When flat is false inherited actions are not returned.
public static java.lang.reflect.Method findMethod(java.lang.Class classObj, java.lang.String name, java.lang.Class[] parameterTypes)
object
- object for which the method is requestedname
- name of the method to retrieveparameterTypes
- method formal parameter typespublic static java.lang.reflect.Method findMethod(java.lang.Class classObj, java.lang.String name)
The first method whose name matches is returned.
object
- object for which the method is requestedname
- name of the method to retrievepublic static java.lang.reflect.Method findGetter(java.lang.Class classObj, java.lang.String property)
object
- object for which a getter is requestedproperty
- property to look for in the objectpublic static java.lang.reflect.Method findIndexedGetter(java.lang.Class classObj, java.lang.String property)
object
- object for which a getter is requestedproperty
- property to look for in the objectpublic static java.lang.reflect.Method findSetter(java.lang.Class classObj, java.lang.String property, java.lang.Class type)
object
- object for which a getter is requestedproperty
- property to look for in the objecttype
- type of the propertypublic static java.lang.reflect.Method findSetter(java.lang.Class classObj, java.lang.String property)
object
- object for which a getter is requestedproperty
- property to look for in the objectpublic static java.lang.reflect.Method findIndexedSetter(java.lang.Class classObj, java.lang.String property, java.lang.Class type)
object
- object for which a getter is requestedproperty
- property to look for in the objecttype
- type of the propertypublic static java.lang.reflect.Method findIndexedSetter(java.lang.Class classObj, java.lang.String property)
object
- object for which a getter is requestedproperty
- property to look for in the objectpublic static java.lang.reflect.Constructor findConstructor(java.lang.Class theClass, java.lang.Class[] parameterTypes)
name
- name of the method to retrieveparameterTypes
- method formal parameter typespublic static java.lang.reflect.Method findPerform(java.lang.Class classObj, java.lang.String name, java.lang.Class[] parametersType)
object
- object for which the method is requestedname
- name of the method to retreiveparameterType
- method formal parameter typeprotected static java.lang.reflect.Method findMethod(java.lang.Class classObj, java.lang.String name, int paramCount)
The first method whose name and parameter count match is returned.
object
- object for which the method is requestedname
- name of the method to retrieveparamCount
- expected number of parameters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |