@Retention(value=SOURCE) @Target(value=TYPE) @Documented public @interface ConvertAsJavaBean
XMLDecoder
and XMLEncoder
to store and read
values of the class (and by default also its subclasses).
The format uses getters and setters of the bean and usually needs default constructor:
@
ConvertAsJavaBean
public class YourObject {
public YourObject() {}
public String getName();
public void setName(String name);
}
If the bean supports PropertyChangeListener
notifications and
contains addPropertyChangeListener
method, the system
starts to listen on existing objects and in case a property change
is delivered, the new state of the object is persisted again.Modifier and Type | Optional Element and Description |
---|---|
boolean |
subclasses
Shall subclasses of this class be also converted as JavaBeans?
|