org.gjt.sp.util

## Class PropertiesBean

- java.lang.Object
- - org.gjt.sp.util.PropertiesBean

-     public abstract class PropertiesBean
      extends java.lang.Object

  A "java bean" that can serialize itself into a java.util.Properties instance. For the serialization, the class uses the java beans instrospection mechanism to figure out the class's available properties, and saves all the properties as strings in the properties object.

  Properties are saved based on a "root", which is set up during the instantiation of the object. The properties will be set as `root.property_name`.

  Only native types (boolean, char, double, float, int, long, short), Strings, and arrays of those types are supported. Also, nested beans are not supported presently.

  Since:
    jEdit 4.3pre7

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PropertiesBean(java.lang.String root)` Creates a new instance with the given root and the default array separator char (':').
    `protected` | `PropertiesBean(java.lang.String root, char arraysep)` Creates a new instance with the given root and the given array separator character.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clean(java.util.Properties p)` Cleans the entries related to this object from the given object.
    `void` | `load(java.util.Properties p)` Loads the bean's properties from the given object.
    `void` | `save(java.util.Properties p)` Saves the bean's properties into the given object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PropertiesBean

          protected PropertiesBean(java.lang.String root)

      Creates a new instance with the given root and the default array separator char (':').
      Parameters:
        `root` - A non-null string that will be the "root" of the serialized properties.

    - #### PropertiesBean

          protected PropertiesBean(java.lang.String root,
                                   char arraysep)

      Creates a new instance with the given root and the given array separator character.
      Parameters:
        `root` - A non-null string that will be the "root" of the serialized properties.
        `arraysep` - A character that will be used to define the separator of elements of an array property.

  - ### Method Detail

    - #### load

          public void load(java.util.Properties p)

      Loads the bean's properties from the given object.

    - #### save

          public void save(java.util.Properties p)

      Saves the bean's properties into the given object.

    - #### clean

          public void clean(java.util.Properties p)

      Cleans the entries related to this object from the given object.