Ask the Expert

Understanding distinguishing traits of Java Beans

I have been trying to get my head around Java Beans, particularly how an invisible Java Bean differs from a standard class. I have read the Java Bean 1.01-A spec, and it says that things like Introspection, Customization, Events, Properties and Persistence are what tend to distinguish Beans. However, being new to Java Beans, I have not really understood the WAY in which these things should be implemented within a Java Bean. If someone could clarify or point me towards some useful resource, and particularly address what "Introspection" actually is, that would be great!

    Requires Free Membership to View

The JavaBeans specification defines a set of standard extensions to the Java programming language for building components. Some of these extensions are in the form of naming conventions and others are actual packages and classes. For a Java class to be technically classified as a Java Bean, it must implement the Serializable interface and expose a public "no-arg" constructor. The other extensions are optional.

Introspection is an extension to Java's standard reflection mechanism that allows Java Beans to expose more descriptive information about them. This is manifested using some subclass of java.beans.FeatureDescriptor and java.beans.BeanInfo.

This was first published in September 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: