@Retention(SOURCE) @Target(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 | Description |
---|---|---|
static String |
IGNORE_ALL_CHANGES |
constant to return from
ignoreChanges() to signal that all
property changes shall be ignored. |
Modifier and Type | Required Element | 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 | 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.
|
static final String IGNORE_ALL_CHANGES
ignoreChanges()
to signal that all
property changes shall be ignored.String dtd
boolean autostore
String[] ignoreChanges
IGNORE_ALL_CHANGES
to ignore all propertiesBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.