com.pelzer.util
Class OverridableFields
java.lang.Object
com.pelzer.util.OverridableFields
- All Implemented Interfaces:
- Serializable
public abstract class OverridableFields
- extends Object
- implements Serializable
This class is used to cache properties from the PropertyManager, and should be extended by local
Constants classes in various packages. Classes should put a line in their static initializer like
this to guarantee the file gets initialized...: new ().init();
- See Also:
- Serialized Form
|
Field Summary |
protected static boolean |
DISABLE_PROPERTY_LOADING
if set to true, NO constants will be loaded by the init() method, leaving the constant
file as it was defined in the .java file. |
|
Method Summary |
protected void |
init()
This method initializes all the fields of this class with constants from the PropertyManager. |
protected void |
init(String domain)
Custom version of 'init()' that allows you to specify your own base domain to pull properties
from. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DISABLE_PROPERTY_LOADING
protected static boolean DISABLE_PROPERTY_LOADING
- if set to true, NO constants will be loaded by the
init() method, leaving the constant
file as it was defined in the .java file. This is only useful when used by the property manager
to determine which properties overrides are actually active.
OverridableFields
public OverridableFields()
init
protected void init()
- This method initializes all the fields of this class with constants from the PropertyManager.
For arrays, items should be put in the property system as PROPERTY_NAME.n , where n is a
0-index number (0,1,2,3,...)
init
protected void init(String domain)
- Custom version of 'init()' that allows you to specify your own base domain to pull properties
from. Generally you should just use init() and initialize with the name of your constants
class.
Copyright © 2012. All Rights Reserved.