// methods
for (Method method : annotatedMBean.getMethods())
{
final int modifiers = method.getModifiers();
final JmxManaged annotation = method.getAnnotation(JmxManaged.class);
if (method.getDeclaringClass().equals(Object.class)
|| !Modifier.isPublic(modifiers)
|| Modifier.isAbstract(modifiers)
|| Modifier.isStatic(modifiers)
|| annotation == null)
{
continue;
}
operations.put(method.getName(), method);
String operationDescr = getDescription(annotation.description(), method.getName());
operationInfos.add(new MBeanOperationInfo(operationDescr, method));
}
Class<?> clazz = annotatedMBean;
while (!Object.class.equals(clazz) && clazz != null)
{
for (Field field : clazz.getDeclaredFields())
{
final JmxManaged annotation = field.getAnnotation(JmxManaged.class);
if (annotation != null)
{
field.setAccessible(true);
final String fieldName = field.getName();
final String fieldDescription = getDescription(annotation.description(), fieldName);
final Class<?> type = field.getType();
final String methodName;
if (fieldName.length() > 1)
{