private String _makeQualifiedMethodName( MethodDescriptor descriptor ) { Method m = descriptor.getMethod(); StringBuffer sb = new StringBuffer(); sb.append(m.getName()); sb.append("="); Class params[] = m.getParameterTypes(); for (int i = 0; i < params.length; i++) { sb.append(":"); sb.append(params[i].getName()); } return sb.toString(); }
private static MethodDescriptor _createMergedMethodDescriptor( MethodDescriptor secondaryDescriptor, MethodDescriptor primaryDescriptor ) { ParameterDescriptor[] parameterDescriptors = primaryDescriptor.getParameterDescriptors(); if (parameterDescriptors == null) { parameterDescriptors = secondaryDescriptor.getParameterDescriptors(); } MethodDescriptor mergedDescriptor = new MethodDescriptor( primaryDescriptor.getMethod(), parameterDescriptors); // merge the superclasses _mergeFeatureDescriptors(secondaryDescriptor, primaryDescriptor, mergedDescriptor); return mergedDescriptor; }
static EventSetDescriptor __createMergedEventSetStub( EventSetDescriptor oldDescriptor, MethodDescriptor[] listenerDescriptors ) { try { EventSetDescriptor stubDescriptor = new EventSetDescriptor( oldDescriptor.getName(), oldDescriptor.getListenerType(), listenerDescriptors, oldDescriptor.getAddListenerMethod(), oldDescriptor.getRemoveListenerMethod()); // set the unicast attribute stubDescriptor.setUnicast(oldDescriptor.isUnicast()); return stubDescriptor; } catch (Exception e) { // _LOG.severe(e); return null; } }
private static MethodDescriptor _cloneMethodDescriptor( MethodDescriptor oldDescriptor ) { try { MethodDescriptor newDescriptor = new MethodDescriptor( oldDescriptor.getMethod(), oldDescriptor.getParameterDescriptors()); // copy the rest of the attributes _copyFeatureDescriptor(oldDescriptor, newDescriptor); return newDescriptor; } catch (Exception e) { _LOG.severe(e); return null; } }
private List<Method> findCandidateWriteMethods(MethodDescriptor[] methodDescriptors) { List<Method> matches = new ArrayList<Method>(); for (MethodDescriptor methodDescriptor : methodDescriptors) { Method method = methodDescriptor.getMethod(); if (isCandidateWriteMethod(method)) { matches.add(method); } } // sort non-void returning write methods to guard against the ill effects of // non-deterministic sorting of methods returned from Class#getDeclaredMethods // under JDK 7. See http://bugs.sun.com/view_bug.do?bug_id=7023180 Collections.sort(matches, new Comparator<Method>() { @Override public int compare(Method m1, Method m2) { return m2.toString().compareTo(m1.toString()); } }); return matches; }
private static Method findMethod(Class<?> targetType, String methodName, Class<?>[] argTypes) throws IntrospectionException { BeanInfo beanInfo = Introspector.getBeanInfo(targetType); if (beanInfo != null) { for(MethodDescriptor methodDesc: beanInfo.getMethodDescriptors()) { Method method = methodDesc.getMethod(); Class<?>[] parameterTypes = method.getParameterTypes(); if (methodName.equals(method.getName()) && argTypes.length == parameterTypes.length) { boolean matchedArgTypes = true; for (int i = 0; i < argTypes.length; i++) { if (getWrapperIfPrimitive(argTypes[i]) != parameterTypes[i]) { matchedArgTypes = false; break; } } if (matchedArgTypes) { return method; } } } } return null; }
private List<Method> findCandidateWriteMethods(MethodDescriptor[] methodDescriptors) { List<Method> matches = new ArrayList<Method>(); for (MethodDescriptor methodDescriptor : methodDescriptors) { Method method = methodDescriptor.getMethod(); if (isCandidateWriteMethod(method)) { matches.add(method); } } // Sort non-void returning write methods to guard against the ill effects of // non-deterministic sorting of methods returned from Class#getDeclaredMethods // under JDK 7. See http://bugs.sun.com/view_bug.do?bug_id=7023180 Collections.sort(matches, new Comparator<Method>() { @Override public int compare(Method m1, Method m2) { return m2.toString().compareTo(m1.toString()); } }); return matches; }
public ExplicitBeanInfo(BeanDescriptor beanDescriptor, BeanInfo[] additionalBeanInfo, PropertyDescriptor[] propertyDescriptors, int defaultPropertyIndex, EventSetDescriptor[] eventSetDescriptors, int defaultEventIndex, MethodDescriptor[] methodDescriptors, Image[] icons) { this.beanDescriptor = beanDescriptor; this.additionalBeanInfo = additionalBeanInfo; this.propertyDescriptors = propertyDescriptors; this.defaultPropertyIndex = defaultPropertyIndex; this.eventSetDescriptors = eventSetDescriptors; this.defaultEventIndex = defaultEventIndex; this.methodDescriptors = methodDescriptors; this.icons = icons; }
public BeanInfoEmbryo getBeanInfoEmbryo() throws IntrospectionException { BeanInfoEmbryo b = new BeanInfoEmbryo(); findXXX(b,IS); findXXXInt(b,GET_I); findXXXInt(b,SET_I); findXXX(b,GET); findXXX(b,SET); findAddRemovePairs(b); for(int i=0;i<otherMethods.size();i++) { MethodDescriptor newMethod = new MethodDescriptor((Method)otherMethods.elementAt(i)); if(!b.hasMethod(newMethod)) { b.addMethod(new MethodDescriptor((Method)otherMethods.elementAt(i))); } } return b; }
/** * Return the global info (if it exists) for the supplied clusterer * * @param clusterer the clusterer to get the global info for * @return the global info (synopsis) for the clusterer * @throws Exception if there is a problem reflecting on the clusterer */ protected static String getGlobalInfo(Clusterer clusterer) throws Exception { BeanInfo bi = Introspector.getBeanInfo(clusterer.getClass()); MethodDescriptor[] methods; methods = bi.getMethodDescriptors(); Object[] args = {}; String result = "\nSynopsis for " + clusterer.getClass().getName() + ":\n\n"; for (MethodDescriptor method : methods) { String name = method.getDisplayName(); Method meth = method.getMethod(); if (name.equals("globalInfo")) { String globalInfo = (String) (meth.invoke(clusterer, args)); result += globalInfo; break; } } return result; }
/** * Return the global info (if it exists) for the supplied classifier. * * @param classifier the classifier to get the global info for * @return the global info (synopsis) for the classifier * @throws Exception if there is a problem reflecting on the classifier */ protected static String getGlobalInfo(Classifier classifier) throws Exception { BeanInfo bi = Introspector.getBeanInfo(classifier.getClass()); MethodDescriptor[] methods; methods = bi.getMethodDescriptors(); Object[] args = {}; String result = "\nSynopsis for " + classifier.getClass().getName() + ":\n\n"; for (MethodDescriptor method : methods) { String name = method.getDisplayName(); Method meth = method.getMethod(); if (name.equals("globalInfo")) { String globalInfo = (String) (meth.invoke(classifier, args)); result += globalInfo; break; } } return result; }
/** * Return the global info (if it exists) for the supplied clusterer * * @param clusterer the clusterer to get the global info for * @return the global info (synopsis) for the clusterer * @throws Exception if there is a problem reflecting on the clusterer */ protected static String getGlobalInfo(Clusterer clusterer) throws Exception { BeanInfo bi = Introspector.getBeanInfo(clusterer.getClass()); MethodDescriptor[] methods; methods = bi.getMethodDescriptors(); Object[] args = {}; String result = "\nSynopsis for " + clusterer.getClass().getName() + ":\n\n"; for (int i = 0; i < methods.length; i++) { String name = methods[i].getDisplayName(); Method meth = methods[i].getMethod(); if (name.equals("globalInfo")) { String globalInfo = (String)(meth.invoke(clusterer, args)); result += globalInfo; break; } } return result; }
/** * Return the global info (if it exists) for the supplied classifier. * * @param classifier the classifier to get the global info for * @return the global info (synopsis) for the classifier * @throws Exception if there is a problem reflecting on the classifier */ protected static String getGlobalInfo(Classifier classifier) throws Exception { BeanInfo bi = Introspector.getBeanInfo(classifier.getClass()); MethodDescriptor[] methods; methods = bi.getMethodDescriptors(); Object[] args = {}; String result = "\nSynopsis for " + classifier.getClass().getName() + ":\n\n"; for (int i = 0; i < methods.length; i++) { String name = methods[i].getDisplayName(); Method meth = methods[i].getMethod(); if (name.equals("globalInfo")) { String globalInfo = (String) (meth.invoke(classifier, args)); result += globalInfo; break; } } return result; }
private List<Method> findCandidateWriteMethods(MethodDescriptor[] methodDescriptors) { List<Method> matches = new ArrayList<Method>(); for (MethodDescriptor methodDescriptor : methodDescriptors) { Method method = methodDescriptor.getMethod(); if (isCandidateWriteMethod(method)) { matches.add(method); } } // sort non-void returning write methods to guard against the ill effects of // non-deterministic sorting of methods returned from Class#getDeclaredMethods // under JDK 7. See http://bugs.sun.com/view_bug.do?bug_id=7023180 Collections.sort(matches, new Comparator<Method>() { public int compare(Method m1, Method m2) { return m2.toString().compareTo(m1.toString()); } }); return matches; }
public void testMethodDescriptorMethod() throws SecurityException, NoSuchMethodException { String beanName = "MethodDescriptorTest.bean"; MockJavaBean bean = new MockJavaBean(beanName); Method method = bean.getClass() .getMethod("getBeanName", (Class[]) null); MethodDescriptor md = new MethodDescriptor(method); assertSame(method, md.getMethod()); assertNull(md.getParameterDescriptors()); assertEquals(method.getName(), md.getDisplayName()); assertEquals(method.getName(), md.getName()); assertEquals(method.getName(), md.getShortDescription()); assertNotNull(md.attributeNames()); assertFalse(md.isExpert()); assertFalse(md.isHidden()); assertFalse(md.isPreferred()); }
public void testMethodDescriptorMethodParameterDescriptorArray() throws SecurityException, NoSuchMethodException { String beanName = "MethodDescriptorTest.bean"; MockJavaBean bean = new MockJavaBean(beanName); Method method = bean.getClass().getMethod("setPropertyOne", new Class[] { String.class }); ParameterDescriptor[] pds = new ParameterDescriptor[1]; pds[0] = new ParameterDescriptor(); pds[0].setValue(method.getName(), method.getReturnType()); MethodDescriptor md = new MethodDescriptor(method, pds); assertSame(method, md.getMethod()); assertSame(pds, md.getParameterDescriptors()); assertEquals(pds[0].getValue(method.getName()), md .getParameterDescriptors()[0].getValue(method.getName())); assertEquals(method.getName(), md.getDisplayName()); assertEquals(method.getName(), md.getName()); assertEquals(method.getName(), md.getShortDescription()); assertNotNull(md.attributeNames()); assertFalse(md.isExpert()); assertFalse(md.isHidden()); assertFalse(md.isPreferred()); }
public void testMethodDescriptorMethodParameterDescriptorArray_PDNull() throws SecurityException, NoSuchMethodException { String beanName = "MethodDescriptorTest.bean"; MockJavaBean bean = new MockJavaBean(beanName); Method method = bean.getClass().getMethod("setPropertyOne", new Class[] { String.class }); MethodDescriptor md = new MethodDescriptor(method, null); assertSame(method, md.getMethod()); assertNull(md.getParameterDescriptors()); assertEquals(method.getName(), md.getDisplayName()); assertEquals(method.getName(), md.getName()); assertEquals(method.getName(), md.getShortDescription()); assertNotNull(md.attributeNames()); assertFalse(md.isExpert()); assertFalse(md.isHidden()); assertFalse(md.isPreferred()); }
private static MethodDescriptor[] getMdescriptor() { final MethodDescriptor[] methods = new MethodDescriptor[4]; try { methods[METHOD_equals0] = new MethodDescriptor(com.github.protobufel.el.Employee.class.getMethod("equals", new Class[] {java.lang.Object.class})); // NOI18N methods[METHOD_equals0].setDisplayName(""); methods[METHOD_hashCode1] = new MethodDescriptor(com.github.protobufel.el.Employee.class.getMethod("hashCode", new Class[] {})); // NOI18N methods[METHOD_hashCode1].setDisplayName(""); methods[METHOD_overloaded12] = new MethodDescriptor(com.github.protobufel.el.Employee.class.getMethod("overloaded1", new Class[] {java.lang.String.class, int.class})); // NOI18N methods[METHOD_overloaded12].setDisplayName(""); methods[METHOD_toString3] = new MethodDescriptor(com.github.protobufel.el.Employee.class.getMethod("toString", new Class[] {})); // NOI18N methods[METHOD_toString3].setDisplayName(""); } catch (final Exception e) { }// GEN-HEADEREND:Methods // Here you can add code for customizing the methods array. return methods; }
public void testGetBeanInfo_StaticMethods() throws Exception { BeanInfo beanInfo = Introspector.getBeanInfo(StaticClazz.class); PropertyDescriptor[] propertyDescriptors = beanInfo .getPropertyDescriptors(); assertEquals(1, propertyDescriptors.length); assertTrue(contains("class", Class.class, propertyDescriptors)); MethodDescriptor[] methodDescriptors = beanInfo.getMethodDescriptors(); assertTrue(contains("getStaticMethod", methodDescriptors)); assertTrue(contains("setStaticMethod", methodDescriptors)); beanInfo = Introspector.getBeanInfo(StaticClazzWithProperty.class); propertyDescriptors = beanInfo.getPropertyDescriptors(); assertEquals(1, propertyDescriptors.length); methodDescriptors = beanInfo.getMethodDescriptors(); assertTrue(contains("getStaticName", methodDescriptors)); assertTrue(contains("setStaticName", methodDescriptors)); }
public void testGetBeanInfoClassint_IGNORE_ALL_Method() throws IntrospectionException { BeanInfo info = Introspector.getBeanInfo(MockFooSub.class, Introspector.IGNORE_ALL_BEANINFO); MethodDescriptor[] mds = info.getMethodDescriptors(); int getMethod = 0; int setMethod = 0; for (MethodDescriptor element : mds) { String name = element.getName(); if (name.startsWith("getText")) { getMethod++; assertEquals("getText", name); } if (name.startsWith("setText")) { setMethod++; assertEquals("setText", name); } } assertEquals(1, getMethod); assertEquals(1, setMethod); }
public void testBeanInfo_1() throws IntrospectionException { Class<FakeFox011> beanClass = FakeFox011.class; BeanInfo info = Introspector.getBeanInfo(beanClass); assertNull(info.getAdditionalBeanInfo()); BeanDescriptor beanDesc = info.getBeanDescriptor(); assertEquals("FakeFox011", beanDesc.getName()); assertEquals(0, info.getEventSetDescriptors().length); assertEquals(-1, info.getDefaultEventIndex()); assertEquals(0, info.getDefaultPropertyIndex()); MethodDescriptor[] methodDesc = info.getMethodDescriptors(); assertEquals(4, methodDesc.length); PropertyDescriptor[] propertyDesc = info.getPropertyDescriptors(); assertEquals(2, propertyDesc.length); for (PropertyDescriptor element : propertyDesc) { if (element.getName().equals("class")) { assertNull(element.getWriteMethod()); assertNotNull(element.getReadMethod()); } } }
public void testExplicitBeanInfo() throws IntrospectionException { BeanInfo info = Introspector.getBeanInfo(MockFoo23.class); assertNull(info.getAdditionalBeanInfo()); BeanDescriptor beanDesc = info.getBeanDescriptor(); assertEquals("IntrospectorTest$MockFoo23", beanDesc.getName()); assertEquals(0, info.getEventSetDescriptors().length); assertEquals(-1, info.getDefaultEventIndex()); assertEquals(-1, info.getDefaultPropertyIndex()); MethodDescriptor[] methodDesc = info.getMethodDescriptors(); assertEquals(10, methodDesc.length); PropertyDescriptor[] propertyDesc = info.getPropertyDescriptors(); assertEquals(1, propertyDesc.length); assertEquals("name.beanInfo", propertyDesc[0].getDisplayName()); assertNotNull(propertyDesc[0].getReadMethod()); assertNull(propertyDesc[0].getWriteMethod()); }
public void testEventSetDescriptorStringClassMethodDescriptorArrayMethodMethod_ListenerMDNull() throws IntrospectionException, NoSuchMethodException { String eventSetName = "MockPropertyChange"; Class<?> listenerType = MockPropertyChangeListener.class; Class<MockSourceClass> sourceClass = MockSourceClass.class; Method addMethod = sourceClass.getMethod( "addMockPropertyChangeListener", listenerType); Method removeMethod = sourceClass.getMethod( "removeMockPropertyChangeListener", listenerType); EventSetDescriptor esd = new EventSetDescriptor(eventSetName, listenerType, (MethodDescriptor[]) null, addMethod, removeMethod); assertNull(esd.getListenerMethodDescriptors()); assertNull(esd.getListenerMethods()); }
public void testSetInDefaultEventSet() throws SecurityException, NoSuchMethodException, IntrospectionException { String eventSetName = "MockPropertyChange"; Class<?> listenerType = MockPropertyChangeListener.class; Method[] listenerMethods = { listenerType.getMethod("mockPropertyChange", MockPropertyChangeEvent.class), listenerType.getMethod("mockPropertyChange2", MockPropertyChangeEvent.class) }; MethodDescriptor[] listenerMethodDescriptors = { new MethodDescriptor(listenerMethods[0]), new MethodDescriptor(listenerMethods[1]), }; Class<MockSourceClass> sourceClass = MockSourceClass.class; Method addMethod = sourceClass.getMethod( "addMockPropertyChangeListener", listenerType); Method removeMethod = sourceClass.getMethod( "removeMockPropertyChangeListener", listenerType); EventSetDescriptor esd = new EventSetDescriptor(eventSetName, listenerType, listenerMethodDescriptors, addMethod, removeMethod); esd.setInDefaultEventSet(true); assertTrue(esd.isInDefaultEventSet()); }
public void testSetInDefaultEventSet_false() throws SecurityException, NoSuchMethodException, IntrospectionException { String eventSetName = "MockPropertyChange"; Class<?> listenerType = MockPropertyChangeListener.class; Method[] listenerMethods = { listenerType.getMethod("mockPropertyChange", new Class[] { MockPropertyChangeEvent.class }), listenerType.getMethod("mockPropertyChange2", new Class[] { MockPropertyChangeEvent.class }), }; MethodDescriptor[] listenerMethodDescriptors = { new MethodDescriptor(listenerMethods[0]), new MethodDescriptor(listenerMethods[1]), }; Class<MockSourceClass> sourceClass = MockSourceClass.class; Method addMethod = sourceClass.getMethod( "addMockPropertyChangeListener", new Class[] { listenerType }); Method removeMethod = sourceClass.getMethod( "removeMockPropertyChangeListener", new Class[] { listenerType }); EventSetDescriptor esd = new EventSetDescriptor(eventSetName, listenerType, listenerMethodDescriptors, addMethod, removeMethod); assertTrue(esd.isInDefaultEventSet()); esd.setInDefaultEventSet(false); assertFalse(esd.isInDefaultEventSet()); }
public void test_EventSetDescriptor_Constructor() throws Exception { EventSetDescriptor eventSetDescriptor = new EventSetDescriptor( (String) null, (Class<?>) null, new MethodDescriptor[] { null, null }, (Method) null, (Method) null); assertNull(eventSetDescriptor.getName()); assertNull(eventSetDescriptor.getListenerType()); assertNull(eventSetDescriptor.getAddListenerMethod()); assertNull(eventSetDescriptor.getRemoveListenerMethod()); try { eventSetDescriptor.getListenerMethods(); fail("should throw NullPointerException"); } catch (NullPointerException e) { // Expected } }
/** * Return the global info (if it exists) for the supplied classifier * * @param classifier the classifier to get the global info for * @return the global info (synopsis) for the classifier * @throws Exception if there is a problem reflecting on the classifier */ protected static String getGlobalInfo(Classifier classifier) throws Exception { BeanInfo bi = Introspector.getBeanInfo(classifier.getClass()); MethodDescriptor[] methods; methods = bi.getMethodDescriptors(); Object[] args = {}; String result = "\nSynopsis for " + classifier.getClass().getName() + ":\n\n"; for (MethodDescriptor method : methods) { String name = method.getDisplayName(); Method meth = method.getMethod(); if (name.equals("globalInfo")) { String globalInfo = (String) (meth.invoke(classifier, args)); result += globalInfo; break; } } return result; }
/** * Utility method for grabbing the global info help (if it exists) from an * arbitrary object * * @param tempBean the object to grab global info from * @return the global help info or null if global info does not exist */ public static String getGlobalInfo(Object tempBean) { // set tool tip text from global info if supplied String gi = null; try { BeanInfo bi = Introspector.getBeanInfo(tempBean.getClass()); MethodDescriptor[] methods = bi.getMethodDescriptors(); for (int i = 0; i < methods.length; i++) { String name = methods[i].getDisplayName(); Method meth = methods[i].getMethod(); if (name.equals("globalInfo")) { if (meth.getReturnType().equals(String.class)) { Object args[] = {}; String globalInfo = (String) (meth.invoke(tempBean, args)); gi = globalInfo; break; } } } } catch (Exception ex) { } return gi; }
protected <T> Method findBeanInfoCandidate(final int paramCount, final String methodName, final Map<String, List<MethodDescriptor>> methodDescriptors, final boolean staticOnly) { for (final MethodDescriptor mDescriptor : methodDescriptors.get(methodName)) { if (mDescriptor.getName().equals(methodName)) { final Method method = mDescriptor.getMethod(); if (isMethodValid(method, staticOnly) && ((method.isVarArgs() && ((method.getParameterTypes().length - paramCount) <= 1)) || (method .getParameterTypes().length == paramCount))) { return method; } } } return null; }
private static EventSetDescriptor _createMergedEventSetDescriptor( EventSetDescriptor secondaryDescriptor, EventSetDescriptor primaryDescriptor ) { // // merge the listener descriptors // MethodDescriptor[] listenerDescriptors = primaryDescriptor.getListenerMethodDescriptors(); if (listenerDescriptors == null) { listenerDescriptors = secondaryDescriptor.getListenerMethodDescriptors(); } // create the stub EvetnSetDescriptor EventSetDescriptor mergedDescriptor = __createMergedEventSetStub( primaryDescriptor, listenerDescriptors); // // merge isDefaultEventSet // mergedDescriptor.setInDefaultEventSet( primaryDescriptor.isInDefaultEventSet() && secondaryDescriptor.isInDefaultEventSet()); // merge the superclasses _mergeFeatureDescriptors(secondaryDescriptor, primaryDescriptor, mergedDescriptor); return mergedDescriptor; }
@Override public MethodDescriptor[] getMethodDescriptors() { if (_methods == null) { if (_introspector != null) { try { _methods = _introspector.__getTargetMethodInfo(); } catch (IntrospectionException e) { // do nothing ; } } else { MethodDescriptor[] oldMethods = _oldBeanInfo.getMethodDescriptors(); if (oldMethods != null) { int len = oldMethods.length; MethodDescriptor[] newMethods = new MethodDescriptor[len]; for (int i = 0; i < len; i++) { newMethods[i] = _cloneMethodDescriptor(oldMethods[i]); } _methods = newMethods; } } } return _methods; }
/** * Wrap the given {@link BeanInfo} instance; copy all its existing property descriptors * locally, wrapping each in a custom {@link SimpleIndexedPropertyDescriptor indexed} * or {@link SimplePropertyDescriptor non-indexed} {@code PropertyDescriptor} * variant that bypasses default JDK weak/soft reference management; then search * through its method descriptors to find any non-void returning write methods and * update or create the corresponding {@link PropertyDescriptor} for each one found. * @param delegate the wrapped {@code BeanInfo}, which is never modified * @throws IntrospectionException if any problems occur creating and adding new * property descriptors * @see #getPropertyDescriptors() */ public ExtendedBeanInfo(BeanInfo delegate) throws IntrospectionException { this.delegate = delegate; for (PropertyDescriptor pd : delegate.getPropertyDescriptors()) { this.propertyDescriptors.add(pd instanceof IndexedPropertyDescriptor ? new SimpleIndexedPropertyDescriptor((IndexedPropertyDescriptor) pd) : new SimplePropertyDescriptor(pd)); } MethodDescriptor[] methodDescriptors = delegate.getMethodDescriptors(); if (methodDescriptors != null) { for (Method method : findCandidateWriteMethods(methodDescriptors)) { handleCandidateWriteMethod(method); } } }
public static void main(final String[] args) throws Exception { Class cl = getStub(); System.out.println("cl.getClassLoader() = " + cl.getClassLoader()); final BeanInfo beanInfo = Introspector.getBeanInfo(cl, Object.class); MethodDescriptor[] mds = beanInfo.getMethodDescriptors(); System.out.println("mds = " + Arrays.toString(mds)); loader.close(); loader=null; cl=null; Util.generateOOME(); mds = beanInfo.getMethodDescriptors(); System.out.println("mds = " + Arrays.toString(mds)); }