org.netbeans.modules.settings/1 1.22.1

org.netbeans.api.settings
Annotation Type ConvertAsProperties


@Retention(value=SOURCE)
@Target(value=TYPE)
public @interface ConvertAsProperties

Annotation to attach to object that is wishing to support conversion from and to 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
   }
 }
 

Since:
1.18

Required Element Summary
 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.
 
Optional Element Summary
 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.
 

Element Detail

dtd

public abstract 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.

Returns:
public ID of the file's DTD

autostore

public abstract boolean autostore
Shall every change in the object result in save? Or shall the object just be marked as dirty?

Default:
true

ignoreChanges

public abstract String[] ignoreChanges
An array of properties that are ignored without marking the object as dirty or saving it.

Returns:
array of property names or IGNORE_ALL_CHANGES to ignore all properties
Default:
{}

org.netbeans.modules.settings/1 1.22.1

Built on December 7 2010.  |  Portions Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.