equal
deleted
inserted
replaced
78 * which we could call getName, getGenericReturnType, etc. A simpler approach |
78 * which we could call getName, getGenericReturnType, etc. A simpler approach |
79 * would be to wrap every Method in an object that does have a common |
79 * would be to wrap every Method in an object that does have a common |
80 * ancestor with ConvertingMethod. But that would mean an extra object |
80 * ancestor with ConvertingMethod. But that would mean an extra object |
81 * for every Method in every Standard MBean interface. |
81 * for every Method in every Standard MBean interface. |
82 */ |
82 */ |
83 abstract class MBeanIntrospector<M> { |
83 public abstract class MBeanIntrospector<M> { |
84 static final class PerInterfaceMap<M> |
84 static final class PerInterfaceMap<M> |
85 extends WeakHashMap<Class<?>, WeakReference<PerInterface<M>>> {} |
85 extends WeakHashMap<Class<?>, WeakReference<PerInterface<M>>> {} |
86 |
86 |
87 /** The map from interface to PerInterface for this type of MBean. */ |
87 /** The map from interface to PerInterface for this type of MBean. */ |
88 abstract PerInterfaceMap<M> getPerInterfaceMap(); |
88 abstract PerInterfaceMap<M> getPerInterfaceMap(); |
555 } |
555 } |
556 } |
556 } |
557 return findNotificationsFromAnnotations(moi.getClass()); |
557 return findNotificationsFromAnnotations(moi.getClass()); |
558 } |
558 } |
559 |
559 |
560 private static MBeanNotificationInfo[] findNotificationsFromAnnotations( |
560 public static MBeanNotificationInfo[] findNotificationsFromAnnotations( |
561 Class<?> mbeanClass) { |
561 Class<?> mbeanClass) { |
562 Class<?> c = getAnnotatedNotificationInfoClass(mbeanClass); |
562 Class<?> c = getAnnotatedNotificationInfoClass(mbeanClass); |
563 if (c == null) |
563 if (c == null) |
564 return null; |
564 return null; |
565 NotificationInfo ni = c.getAnnotation(NotificationInfo.class); |
565 NotificationInfo ni = c.getAnnotation(NotificationInfo.class); |