spring-framework / org.springframework.jmx.support / JmxUtils / getClassToExpose

getClassToExpose

open static fun getClassToExpose(managedBean: Any): Class<*>

Return the class or interface to expose for the given bean. This is the class that will be searched for attributes and operations (for example, checked for annotations).

This implementation returns the superclass for a CGLIB proxy and the class of the given bean else (for a JDK proxy or a plain bean class).

Parameters

managedBean - the bean instance (might be an AOP proxy)

Return
the bean class to expose

See Also
org.springframework.util.ClassUtils#getUserClass(Object)

open static fun getClassToExpose(clazz: Class<*>): Class<*>

Return the class or interface to expose for the given bean class. This is the class that will be searched for attributes and operations (for example, checked for annotations).

This implementation returns the superclass for a CGLIB proxy and the class of the given bean else (for a JDK proxy or a plain bean class).

Parameters

clazz - the bean class (might be an AOP proxy class)

Return
the bean class to expose

See Also
org.springframework.util.ClassUtils#getUserClass(Class)