@Retention(value=SOURCE) @Target(value=TYPE) public @interface ConvertAsProperties
Properties
. More info about the format and protocol
is available in separate document,
here is the shortest possible howto:
@
ConvertAsProperties(dtd="-//Your Org//Your Setting//EN")
public class YourObject {
public YourObject() {} // public constructor is a must
void readProperties(java.util.Properties p) {
// do the read
}
void writeProperties(java.util.Properties p) {
// handle the store
}
}
Modifier and Type | Fields and Description |
---|---|
static String |
IGNORE_ALL_CHANGES
constant to return from
ConvertAsProperties.ignoreChanges() to signal that all
property changes shall be ignored. |
Modifier and Type | Required Element and Description |
---|---|
String |
dtd
Public ID of the XML file that results in creation of the
annotated type and to which the annotated type can be converted.
|
Modifier and Type | Optional Element and Description |
---|---|
boolean |
autostore
Shall every change in the object result in save? Or shall the
object just be marked as dirty?
|
String[] |
ignoreChanges
An array of properties that are ignored without marking the object
as dirty or saving it.
|
public static final String IGNORE_ALL_CHANGES
ConvertAsProperties.ignoreChanges()
to signal that all
property changes shall be ignored.public abstract String dtd
public abstract boolean autostore
public abstract String[] ignoreChanges
ConvertAsProperties.IGNORE_ALL_CHANGES
to ignore all properties