ArrayPersistenceDelegate
| |
code | html |
ArrayPersistenceDelegate
| |
code | html |
AwtChoicePersistenceDelegate
| |
code | html |
AwtColorPersistenceDelegate
| |
code | html |
AwtComponentPersistenceDelegate
| |
code | html |
AwtContainerPersistenceDelegate
| |
code | html |
AwtCursorPersistenceDelegate
| |
code | html |
AwtDimensionPersistenceDelegate
| |
code | html |
AwtFontPersistenceDelegate
| |
code | html |
AwtFontTextAttributePersistenceDelegate
| |
code | html |
AwtInsetsPersistenceDelegate
| |
code | html |
AwtListPersistenceDelegate
| |
code | html |
AwtMenuBarPersistenceDelegate
| |
code | html |
AwtMenuPersistenceDelegate
| |
code | html |
AwtMenuShortcutPersistenceDelegate
| |
code | html |
AwtPointPersistenceDelegate
| |
code | html |
AwtRectanglePersistenceDelegate
| |
code | html |
AwtScrollPanePersistenceDelegate
| |
code | html |
AwtSystemColorPersistenceDelegate
| |
code | html |
BeanDescriptor
| A BeanDescriptor provides global information about a "bean",
including its Java class, its displayName, etc. |
code | html |
Beans
| This class provides some general purpose beans control methods. |
code | html |
BeansAppletContext
| Package private support class. |
code | html |
BeansAppletStub
| Package private support class. |
code | html |
ClassPersistenceDelegate
| |
code | html |
ConstructorProperties
| An annotation on a constructor that shows how the parameters of
that constructor correspond to the constructed object's getter
methods. |
code | html |
CustomizedObjectInputStream
| Customized object input stream that allows to read objects by specified class
loader |
code | html |
DefaultPersistenceDelegate
| The DefaultPersistenceDelegate is a concrete implementation of
the abstract PersistenceDelegate class and
is the delegate used by default for classes about
which no information is available. |
code | html |
Encoder
| An Encoder is a class which can be used to create
files or streams that encode the state of a collection of
JavaBeans in terms of their public APIs. |
code | html |
EnumPersistenceDelegate
| The persistence delegate for enum classes. |
code | html |
EventHandler
| The EventHandler class provides
support for dynamically generating event listeners whose methods
execute a simple statement involving an incoming event object
and a target object. |
code | html |
EventSetDescriptor
| An EventSetDescriptor describes a group of events that a given Java
bean fires. |
code | html |
Expression
| An Expression object represents a primitive expression
in which a single method is applied to a target and a set of
arguments to return a result - as in "a.getFoo()" . |
code | html |
FeatureDescriptor
| The FeatureDescriptor class is the common baseclass for PropertyDescriptor,
EventSetDescriptor, and MethodDescriptor, etc. |
code | html |
FieldPersistenceDelegate
| This is a persistence delegate for the java.lang.reflect.Field class. |
code | html |
GenericBeanInfo
| Package private implementation support class for Introspector's
internal use. |
code | html |
IndexedPropertyChangeEvent
| An "IndexedPropertyChange" event gets delivered whenever a component that
conforms to the JavaBeans™ specification (a "bean") changes a bound
indexed property. |
code | html |
IndexedPropertyDescriptor
| An IndexedPropertyDescriptor describes a property that acts like an
array and has an indexed read and/or indexed write method to access
specific elements of the array. |
code | html |
IntrospectionException
| Thrown when an exception happens during Introspection. |
code | html |
Introspector
| The Introspector class provides a standard way for tools to learn about
the properties, events, and methods supported by a target Java Bean. |
code | html |
MetaData
| |
code | html |
MethodDescriptor
| A MethodDescriptor describes a particular method that a Java Bean
supports for external access from other components. |
code | html |
MethodPersistenceDelegate
| Persistence delegate for java.lang.reflect.Method class. |
code | html |
NameGenerator
| A utility class which generates unique names for object instances. |
code | html |
NullPersistenceDelegate
| |
code | html |
NullPersistenceDelegate
| |
code | html |
ObjectInputStreamWithLoader
| This subclass of ObjectInputStream delegates loading of classes to
an existing ClassLoader. |
code | html |
ParameterDescriptor
| The ParameterDescriptor class allows bean implementors to provide
additional information on each of their parameters, beyond the
low level type information provided by the java.lang.reflect.Method
class. |
code | html |
PrimitivePersistenceDelegate
| |
code | html |
PrimitiveWrapperPersistenceDelegate
| A special internal PersistenceDelegate for wrapper classes of
primitive types like int. |
code | html |
PropertyChangeEvent
| A "PropertyChange" event gets delivered whenever a bean changes a "bound"
or "constrained" property. |
code | html |
PropertyChangeListenerProxy
| A class which extends the {@code EventListenerProxy}
specifically for adding a {@code PropertyChangeListener}
with a "bound" property. |
code | html |
PropertyChangeSupport
| This is a utility class that can be used by beans that support bound
properties. |
code | html |
PropertyChangeSupport.PropertyChangeListenerMap
| This is a ChangeListenerMap implementation
that works with PropertyChangeListener objects. |
code | html |
PropertyDescriptor
| A PropertyDescriptor describes one property that a Java Bean
exports via a pair of accessor methods. |
code | html |
PropertyEditorManager
| The PropertyEditorManager can be used to locate a property editor for
any given type name. |
code | html |
PropertyEditorSupport
| This is a support class to help build property editors. |
code | html |
PropertyVetoException
| A PropertyVetoException is thrown when a proposed change to a
property represents an unacceptable value. |
code | html |
ProxyPersistenceDelegate
| |
code | html |
ProxyPersistenceDelegate
| |
code | html |
ReferenceMap
| A simple map. |
code | html |
ReferenceMap.Pair
| |
code | html |
ReflectionUtils
| A utility class for reflectively finding methods, constuctors and fields
using reflection. |
code | html |
SimpleBeanInfo
| This is a support class to make it easier for people to provide
BeanInfo classes. |
code | html |
StandardBeanInfo
| |
code | html |
StandardBeanInfo.PropertyComparator
| |
code | html |
Statement
| A Statement object represents a primitive statement
in which a single method is applied to a target and
a set of arguments - as in "a.setFoo(b)" . |
code | html |
StaticFieldPersistenceDelegate
| |
code | html |
StaticFieldsPersistenceDelegate
| |
code | html |
StringPersistenceDelegate
| |
code | html |
SwingAbstractButtonPersistenceDelegate
| A special internal PersistenceDelegate for java.awt.JComponent
class. |
code | html |
SwingBoxPersistenceDelegate
| |
code | html |
SwingDefaultComboBoxModelPersistenceDelegate
| |
code | html |
SwingJFramePersistenceDelegate
| |
code | html |
SwingJTabbedPanePersistenceDelegate
| |
code | html |
SwingToolTipManagerPersistenceDelegate
| |
code | html |
Transient
| Indicates that an attribute called "transient"
should be declared with the given {@code value}
when the Introspector constructs
a PropertyDescriptor or EventSetDescriptor
classes associated with the annotated code element. |
code | html |
UtilCollectionPersistenceDelegate
| |
code | html |
UtilDatePersistenceDelegate
| |
code | html |
UtilListPersistenceDelegate
| |
code | html |
UtilMapPersistenceDelegate
| |
code | html |
VetoableChangeListenerProxy
| A class which extends the {@code EventListenerProxy}
specifically for adding a {@code VetoableChangeListener}
with a "constrained" property. |
code | html |
VetoableChangeSupport
| This is a utility class that can be used by beans that support constrained
properties. |
code | html |
VetoableChangeSupport.VetoableChangeListenerMap
| This is a ChangeListenerMap implementation
that works with VetoableChangeListener objects. |
code | html |
XMLDecoder
| The XMLDecoder class is used to read XML documents
created using the XMLEncoder and is used just like
the ObjectInputStream . |
code | html |
XMLEncoder
| The XMLEncoder class is a complementary alternative to
the ObjectOutputStream and can used to generate
a textual representation of a JavaBean in the same
way that the ObjectOutputStream can
be used to create binary representation of Serializable
objects. |
code | html |
XMLEncoder.ValueData
| |
code | html |
java_awt_AWTKeyStroke_PersistenceDelegate
| The persistence delegate for AWTKeyStroke . |
code | html |
java_awt_BorderLayout_PersistenceDelegate
| |
code | html |
java_awt_CardLayout_PersistenceDelegate
| |
code | html |
java_awt_Choice_PersistenceDelegate
| |
code | html |
java_awt_Component_PersistenceDelegate
| |
code | html |
java_awt_Container_PersistenceDelegate
| |
code | html |
java_awt_Font_PersistenceDelegate
| The persistence delegate for Font . |
code | html |
java_awt_GridBagLayout_PersistenceDelegate
| |
code | html |
java_awt_Insets_PersistenceDelegate
| The persistence delegate for Insets . |
code | html |
java_awt_List_PersistenceDelegate
| |
code | html |
java_awt_MenuBar_PersistenceDelegate
| |
code | html |
java_awt_MenuShortcut_PersistenceDelegate
| |
code | html |
java_awt_Menu_PersistenceDelegate
| |
code | html |
java_awt_SystemColor_PersistenceDelegate
| |
code | html |
java_awt_font_TextAttribute_PersistenceDelegate
| |
code | html |
java_beans_beancontext_BeanContextSupport_PersistenceDelegate
| |
code | html |
java_lang_Class_PersistenceDelegate
| |
code | html |
java_lang_String_PersistenceDelegate
| |
code | html |
java_lang_reflect_Field_PersistenceDelegate
| |
code | html |
java_lang_reflect_Method_PersistenceDelegate
| |
code | html |
java_sql_Timestamp_PersistenceDelegate
| The persistence delegate for java.sql.Timestamp classes. |
code | html |
java_util_AbstractCollection_PersistenceDelegate
| |
code | html |
java_util_AbstractList_PersistenceDelegate
| |
code | html |
java_util_AbstractMap_PersistenceDelegate
| |
code | html |
java_util_Collection_PersistenceDelegate
| |
code | html |
java_util_Collections.CheckedCollection_PersistenceDelegate
| |
code | html |
java_util_Collections.CheckedList_PersistenceDelegate
| |
code | html |
java_util_Collections.CheckedMap_PersistenceDelegate
| |
code | html |
java_util_Collections.CheckedRandomAccessList_PersistenceDelegate
| |
code | html |
java_util_Collections.CheckedSet_PersistenceDelegate
| |
code | html |
java_util_Collections.CheckedSortedMap_PersistenceDelegate
| |
code | html |
java_util_Collections.CheckedSortedSet_PersistenceDelegate
| |
code | html |
java_util_Collections.EmptyList_PersistenceDelegate
| |
code | html |
java_util_Collections.EmptyMap_PersistenceDelegate
| |
code | html |
java_util_Collections.EmptySet_PersistenceDelegate
| |
code | html |
java_util_Collections.SingletonList_PersistenceDelegate
| |
code | html |
java_util_Collections.SingletonMap_PersistenceDelegate
| |
code | html |
java_util_Collections.SingletonSet_PersistenceDelegate
| |
code | html |
java_util_Collections.SynchronizedCollection_PersistenceDelegate
| |
code | html |
java_util_Collections.SynchronizedList_PersistenceDelegate
| |
code | html |
java_util_Collections.SynchronizedMap_PersistenceDelegate
| |
code | html |
java_util_Collections.SynchronizedRandomAccessList_PersistenceDelegate
| |
code | html |
java_util_Collections.SynchronizedSet_PersistenceDelegate
| |
code | html |
java_util_Collections.SynchronizedSortedMap_PersistenceDelegate
| |
code | html |
java_util_Collections.SynchronizedSortedSet_PersistenceDelegate
| |
code | html |
java_util_Collections.UnmodifiableCollection_PersistenceDelegate
| |
code | html |
java_util_Collections.UnmodifiableList_PersistenceDelegate
| |
code | html |
java_util_Collections.UnmodifiableMap_PersistenceDelegate
| |
code | html |
java_util_Collections.UnmodifiableRandomAccessList_PersistenceDelegate
| |
code | html |
java_util_Collections.UnmodifiableSet_PersistenceDelegate
| |
code | html |
java_util_Collections.UnmodifiableSortedMap_PersistenceDelegate
| |
code | html |
java_util_Collections.UnmodifiableSortedSet_PersistenceDelegate
| |
code | html |
java_util_Date_PersistenceDelegate
| The persistence delegate for java.util.Date classes. |
code | html |
java_util_EnumMap_PersistenceDelegate
| The persistence delegate for java.util.EnumMap classes. |
code | html |
java_util_EnumSet_PersistenceDelegate
| The persistence delegate for java.util.EnumSet classes. |
code | html |
java_util_Hashtable_PersistenceDelegate
| |
code | html |
java_util_List_PersistenceDelegate
| |
code | html |
java_util_Map_PersistenceDelegate
| |
code | html |
javax_swing_Box_PersistenceDelegate
| |
code | html |
javax_swing_DefaultComboBoxModel_PersistenceDelegate
| |
code | html |
javax_swing_DefaultListModel_PersistenceDelegate
| |
code | html |
javax_swing_JFrame_PersistenceDelegate
| |
code | html |
javax_swing_JMenu_PersistenceDelegate
| |
code | html |
javax_swing_JTabbedPane_PersistenceDelegate
| |
code | html |
javax_swing_ToolTipManager_PersistenceDelegate
| |
code | html |
javax_swing_border_MatteBorder_PersistenceDelegate
| The persistence delegate for MatteBorder . |
code | html |
javax_swing_tree_DefaultMutableTreeNode_PersistenceDelegate
| |
code | html |
sun_swing_PrintColorUIResource_PersistenceDelegate
| The persistence delegate for PrintColorUIResource . |
code | html |
Contains classes related to developing
beans -- components
based on the JavaBeans™ architecture.
A few of the
classes are used by beans while they run in an application.
For example, the event classes are
used by beans that fire property and vetoable change
events (see
java.beans.PropertyChangeEvent ). However, most of the classes in this
package are meant to be used by a bean editor (that is, a development environment
for customizing and putting together beans to create an application). In
particular, these classes help the bean editor create a user
interface that the user can use to customize the bean. For example, a bean may
contain a property of a special type that a bean editor may not know how to handle.
By using the PropertyEditor
interface, a bean developer can
provide an editor for this special type.
To minimize the resources used by a bean, the classes used by bean editors are loaded only
when the bean is being edited. They are not needed while the bean is running in an application
and therefore not loaded. This information is kept in what's called a bean-info (see java.beans.BeanInfo ).
Unless explicitly stated, null values or empty Strings are not valid
parameters for the methods in this package. You may expect to see
exceptions if these parameters are used.
Long-Term Persistence
As of v1.4,
the java.beans
package provides support for
long-term persistence -- reading and
writing a bean as a textual representation of its property values.
The property values are treated as beans,
and are recursively read or written to capture
their publicly available state.
This approach is suitable for long-term storage
because it relies only on public API,
rather than the likely-to-change private implementation.
Note:
The persistence scheme cannot automatically instantiate
custom inner classes, such as you might use for event handlers.
By using the java.beans.EventHandler class
instead of inner classes for custom event handlers,
you can avoid this problem.
You read and write beans in XML format using the
java.beans.XMLDecoder
and
java.beans.XMLEncoder
classes, respectively.
One notable feature of the persistence scheme is that
reading in a bean requires no special knowledge of the bean.
Writing out a bean, on the other hand,
sometimes requires special knowledge of the bean's type.
If the bean's state can be
expressed using only the no-argument constructor and
public getter and setter methods for properties,
no special knowledge is required.
Otherwise, the bean requires a custom persistence delegate --
an object that is in charge of writing out beans of a particular type.
All classes provided in the JDK that descend
from java.awt.Component
,
as well as all their properties,
automatically have persistence delegates.
If you need (or choose) to provide a persistence delegate for a bean,
you can do so either by using a
java.beans.DefaultPersistenceDelegate
instance
or by creating your own subclass of PersistenceDelegate
.
If the only reason a bean needs a persistence delegate
is because you want to invoke the bean's constructor with
property values as arguments,
you can create the bean's persistence delegate
with the one-argument
DefaultPersistenceDelegate
constructor.
Otherwise,
you need to implement your own persistence delegate,
for which you're likely to need the following classes:
- java.beans.PersistenceDelegate
- The abstract class from which all persistence delegates descend.
Your subclass should use its knowledge of the bean's type to provide
whatever
Statement
s and Expression
s
are necessary to create the bean
and restore its state.
- java.beans.Statement
- Represents the invocation of a single method on an object.
Includes a set of arguments to the method.
- java.beans.Expression
- A subclass of
Statement
used for methods that return a value.
Once you create a persistence delegate,
you register it using the
setPersistenceDelegate
method of
XMLEncoder
.
Related Documentation
For overview, architecture, and tutorial documentation, please see: