List of usage examples for java.beans Introspector getBeanInfoSearchPath
public static String[] getBeanInfoSearchPath()
From source file:org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.java
/** * @return the {@link BeanInfo} of given component {@link Class}. *//*from w w w.j av a 2 s . co m*/ public static BeanInfo getBeanInfo(Class<?> clazz) throws IntrospectionException { // standard components don't have BeanInfo's { String className = clazz.getName(); if (className.startsWith("java.lang.") || className.startsWith("java.awt.") || className.startsWith("javax.swing.") || className.startsWith("org.eclipse.swt") || className.startsWith("org.eclipse.jface") || className.startsWith("org.eclipse.ui.forms")) { return null; } } // OK, get BeanInfo (may be not trivial) Introspector.flushCaches(); String[] standard_beanInfoSearchPath = Introspector.getBeanInfoSearchPath(); try { Introspector.setBeanInfoSearchPath(new String[] {}); return Introspector.getBeanInfo(clazz); } finally { Introspector.flushCaches(); Introspector.setBeanInfoSearchPath(standard_beanInfoSearchPath); } }