Search in sources :

Example 26 with MethodDescriptor

use of java.beans.MethodDescriptor in project jdk8u_jdk by JetBrains.

the class Test6277246 method main.

public static void main(String[] args) throws IntrospectionException {
    Class type = BASE64Encoder.class;
    System.setSecurityManager(new SecurityManager());
    BeanInfo info = Introspector.getBeanInfo(type);
    for (MethodDescriptor md : info.getMethodDescriptors()) {
        Method method = md.getMethod();
        System.out.println(method);
        String name = method.getDeclaringClass().getName();
        if (name.startsWith("sun.misc.")) {
            throw new Error("found inaccessible method");
        }
    }
}
Also used : BASE64Encoder(sun.misc.BASE64Encoder) BeanInfo(java.beans.BeanInfo) Method(java.lang.reflect.Method) MethodDescriptor(java.beans.MethodDescriptor)

Aggregations

MethodDescriptor (java.beans.MethodDescriptor)26 Method (java.lang.reflect.Method)18 EventSetDescriptor (java.beans.EventSetDescriptor)9 BeanInfo (java.beans.BeanInfo)8 MockPropertyChangeListener (org.apache.harmony.beans.tests.support.mock.MockPropertyChangeListener)7 MockPropertyChangeEvent (org.apache.harmony.beans.tests.support.mock.MockPropertyChangeEvent)6 IndexedPropertyDescriptor (java.beans.IndexedPropertyDescriptor)5 PropertyDescriptor (java.beans.PropertyDescriptor)5 SimpleBeanInfo (java.beans.SimpleBeanInfo)5 FakeFox01BeanInfo (org.apache.harmony.beans.tests.support.mock.FakeFox01BeanInfo)5 ParameterDescriptor (java.beans.ParameterDescriptor)4 BeanDescriptor (java.beans.BeanDescriptor)3 MockJavaBean (org.apache.harmony.beans.tests.support.mock.MockJavaBean)3 IntrospectionException (java.beans.IntrospectionException)2 ArrayList (java.util.ArrayList)2 KeyEvent (java.awt.event.KeyEvent)1 KeyListener (java.awt.event.KeyListener)1 FeatureDescriptor (java.beans.FeatureDescriptor)1 IndexedPropertyChangeEvent (java.beans.IndexedPropertyChangeEvent)1 PropertyChangeEvent (java.beans.PropertyChangeEvent)1