equal
deleted
inserted
replaced
49 import javax.management.MBeanNotificationInfo; |
49 import javax.management.MBeanNotificationInfo; |
50 import javax.management.MBeanOperationInfo; |
50 import javax.management.MBeanOperationInfo; |
51 import javax.management.NotCompliantMBeanException; |
51 import javax.management.NotCompliantMBeanException; |
52 import javax.management.NotificationBroadcaster; |
52 import javax.management.NotificationBroadcaster; |
53 import javax.management.ReflectionException; |
53 import javax.management.ReflectionException; |
|
54 import sun.reflect.misc.ReflectUtil; |
54 |
55 |
55 /** |
56 /** |
56 * An introspector for MBeans of a certain type. There is one instance |
57 * An introspector for MBeans of a certain type. There is one instance |
57 * of this class for Standard MBeans, and one for every MXBeanMappingFactory; |
58 * of this class for Standard MBeans, and one for every MXBeanMappingFactory; |
58 * these two cases correspond to the two concrete subclasses of this abstract |
59 * these two cases correspond to the two concrete subclasses of this abstract |
173 abstract Descriptor getMBeanDescriptor(Class<?> resourceClass); |
174 abstract Descriptor getMBeanDescriptor(Class<?> resourceClass); |
174 |
175 |
175 /** |
176 /** |
176 * Get the methods to be analyzed to build the MBean interface. |
177 * Get the methods to be analyzed to build the MBean interface. |
177 */ |
178 */ |
178 List<Method> getMethods(final Class<?> mbeanType) { |
179 final List<Method> getMethods(final Class<?> mbeanType) { |
|
180 ReflectUtil.checkPackageAccess(mbeanType); |
179 return Arrays.asList(mbeanType.getMethods()); |
181 return Arrays.asList(mbeanType.getMethods()); |
180 } |
182 } |
181 |
183 |
182 final PerInterface<M> getPerInterface(Class<?> mbeanInterface) |
184 final PerInterface<M> getPerInterface(Class<?> mbeanInterface) |
183 throws NotCompliantMBeanException { |
185 throws NotCompliantMBeanException { |