| Previous | Next |
The java.beans Package
Contents:
java.beans.BeanInfo (JDK 1.1)
java.beans.Beans (JDK 1.1)
java.beans.Customizer (JDK 1.1)
java.beans.EventSetDescriptor (JDK 1.1)
java.beans.FeatureDescriptor (JDK 1.1)
java.beans.IndexedPropertyDescriptor (JDK 1.1)
java.beans.IntrospectionException (JDK 1.1)
java.beans.Introspector (JDK 1.1)
java.beans.MethodDescriptor (JDK 1.1)
java.beans.ParameterDescriptor (JDK 1.1)
java.beans.PropertyChangeEvent (JDK 1.1)
java.beans.PropertyChangeListener (JDK 1.1)
java.beans.PropertyChangeSupport (JDK 1.1)
java.beans.PropertyDescriptor (JDK 1.1)
java.beans.PropertyEditor (JDK 1.1)
java.beans.PropertyEditorManager (JDK 1.1)
java.beans.PropertyEditorSupport (JDK 1.1)
java.beans.PropertyVetoException (JDK 1.1)
java.beans.SimpleBeanInfo (JDK 1.1)
java.beans.VetoableChangeListener (JDK 1.1)
java.beans.VetoableChangeSupport (JDK 1.1)
java.beans.Visibility (JDK 1.1)
The java.beans package contains the classes and interfaces that constitute the JavaBeans API. It is new in Java 1.1. Figure 23.1 shows the class hierarchy for this package.
The classes and interfaces in this package are useful to developers who are developing "beanbox" tools to manipulate beans, and to developers who are writing their own beans. Developers who are building applications using beans do not have to be familiar with java.beans. See Java Beans for more details on writing custom beans.
Figure 23.1: The java.beans package
java.beans.BeanDescriptor (JDK 1.1)
A BeanDescriptor object is a type of FeatureDescriptor that describes a Java bean. The BeanInfo class for a Java bean optionally creates and initializes a BeanDescriptor object to describe the bean. Typically, only application builders and similar tools use the BeanDescriptor.
To create a BeanDescriptor, you must specify the class of the bean, and optionally, the class of a Customizer for the bean. You can use the methods of FeatureDescriptor to provide additional information about the bean.
public classBeanDescriptorextends FeatureDescriptor { //Public ConstructorspublicBeanDescriptor(ClassbeanClass); publicBeanDescriptor(ClassbeanClass, ClasscustomizerClass); //Public Instance Methodspublic ClassgetBeanClass(); public ClassgetCustomizerClass(); }
Hierarchy:
Object->FeatureDescriptor->BeanDescriptor
Returned By:
BeanInfo.getBeanDescriptor(), SimpleBeanInfo.getBeanDescriptor()
