src/java.desktop/share/classes/java/beans/Introspector.java

Print this page




  30 import com.sun.beans.introspect.ClassInfo;
  31 import com.sun.beans.introspect.EventSetInfo;
  32 import com.sun.beans.introspect.PropertyInfo;
  33 
  34 import java.awt.Component;
  35 
  36 import java.lang.ref.Reference;
  37 import java.lang.ref.SoftReference;
  38 import java.lang.reflect.Constructor;
  39 import java.lang.reflect.Method;
  40 import java.lang.reflect.Type;
  41 
  42 import java.util.Map;
  43 import java.util.ArrayList;
  44 import java.util.Arrays;
  45 import java.util.HashMap;
  46 import java.util.Iterator;
  47 import java.util.EventObject;
  48 import java.util.List;
  49 import java.util.TreeMap;
  50 import sun.misc.JavaBeansAccess;
  51 
  52 import sun.misc.SharedSecrets;

  53 import sun.reflect.misc.ReflectUtil;
  54 
  55 /**
  56  * The Introspector class provides a standard way for tools to learn about
  57  * the properties, events, and methods supported by a target Java Bean.
  58  * <p>
  59  * For each of those three kinds of information, the Introspector will
  60  * separately analyze the bean's class and superclasses looking for
  61  * either explicit or implicit information and use that information to
  62  * build a BeanInfo object that comprehensively describes the target bean.
  63  * <p>
  64  * For each class "Foo", explicit information may be available if there exists
  65  * a corresponding "FooBeanInfo" class that provides a non-null value when
  66  * queried for the information.   We first look for the BeanInfo class by
  67  * taking the full package-qualified name of the target bean class and
  68  * appending "BeanInfo" to form a new class name.  If this fails, then
  69  * we take the final classname component of this name, and look for that
  70  * class in each of the packages specified in the BeanInfo package search
  71  * path.
  72  * <p>




  30 import com.sun.beans.introspect.ClassInfo;
  31 import com.sun.beans.introspect.EventSetInfo;
  32 import com.sun.beans.introspect.PropertyInfo;
  33 
  34 import java.awt.Component;
  35 
  36 import java.lang.ref.Reference;
  37 import java.lang.ref.SoftReference;
  38 import java.lang.reflect.Constructor;
  39 import java.lang.reflect.Method;
  40 import java.lang.reflect.Type;
  41 
  42 import java.util.Map;
  43 import java.util.ArrayList;
  44 import java.util.Arrays;
  45 import java.util.HashMap;
  46 import java.util.Iterator;
  47 import java.util.EventObject;
  48 import java.util.List;
  49 import java.util.TreeMap;

  50 
  51 import jdk.internal.misc.JavaBeansAccess;
  52 import jdk.internal.misc.SharedSecrets;
  53 import sun.reflect.misc.ReflectUtil;
  54 
  55 /**
  56  * The Introspector class provides a standard way for tools to learn about
  57  * the properties, events, and methods supported by a target Java Bean.
  58  * <p>
  59  * For each of those three kinds of information, the Introspector will
  60  * separately analyze the bean's class and superclasses looking for
  61  * either explicit or implicit information and use that information to
  62  * build a BeanInfo object that comprehensively describes the target bean.
  63  * <p>
  64  * For each class "Foo", explicit information may be available if there exists
  65  * a corresponding "FooBeanInfo" class that provides a non-null value when
  66  * queried for the information.   We first look for the BeanInfo class by
  67  * taking the full package-qualified name of the target bean class and
  68  * appending "BeanInfo" to form a new class name.  If this fails, then
  69  * we take the final classname component of this name, and look for that
  70  * class in each of the packages specified in the BeanInfo package search
  71  * path.
  72  * <p>