home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Java in a Nutshell

Previous Chapter 23 Next

23. The java.beans Package

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 programmers who are developing "beanbox" tools to manipulate beans, and to programmers who are writing their own beans. Programmers who are building applications using beans do not have to be familiar with java.beans. See Chapter 10, Java Beans for more details on writing custom beans.

23.1 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 class BeanDescriptor extends FeatureDescriptor {
    // Public Constructors
            public BeanDescriptor(Class beanClass);
            public BeanDescriptor(Class beanClass, Class customizerClass);
    // Public Instance Methods
            public Class getBeanClass();
            public Class getCustomizerClass();



Returned By:

BeanInfo.getBeanDescriptor(), SimpleBeanInfo.getBeanDescriptor()

Previous Home Next
java.awt.peer.WindowPeer (JDK 1.0) Book Index java.beans.BeanInfo (JDK 1.1)

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java