|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary<K,V> java.util.Hashtable<java.lang.Object,java.lang.Object> java.util.Properties com.cosylab.util.ExtendedProperties
public class ExtendedProperties
DOCUMENT ME!
Field Summary | |
---|---|
static java.lang.String |
DELIMITER
The delimiter that is used to separate each part in the property name that makes the hierarchy. |
static java.lang.String |
LINK_SUFFIX
Suffix used to speficy a linked properties file. |
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
ExtendedProperties()
Creates a new ExtendedProperties object. |
|
ExtendedProperties(java.util.Properties defaults)
Creates a new ExtendedProperties object. |
Method Summary | |
---|---|
void |
checkForLinks(java.net.URL resource)
|
java.lang.Class |
getClassProperty(java.lang.String key)
Convenience method that tries to return Class instace
specified by fully qualified string. |
double |
getDoubleProperty(java.lang.String key)
Convenience method that tries to return double value of property. |
int |
getIntProperty(java.lang.String key)
Convenience method that tries to return int value of property. |
ExtendedProperties |
getProperties(java.lang.String mementoName)
Returns an instance of the ExtendedProperties object which have only properties under the hierarchy given by mementoName . |
void |
load(java.io.InputStream inStream)
Deprecated. Use @link #load(URL) to process links properly |
void |
load(java.net.URL resource)
|
void |
setProperties(java.lang.String mementoName,
ExtendedProperties ep)
Inserts the content of the given ExtendedProperties to this properties by prefixing each key with given mementoName . |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LINK_SUFFIX
e.g.: icon.@link = gui/icons.properties
will look
for a file "gui/icons.properties" and a property named text.edit
from this file will be referenced in the parent properties as "icon.text.edit".
If multiple links are assigned to the same prefix, they should be numbered
so that their property keys remain unique, e.g.:
icon.@link1 = gui/myIcons.properties
icon.@link2 = gui/otherIcons.properties
public static final java.lang.String DELIMITER
Constructor Detail |
---|
public ExtendedProperties()
public ExtendedProperties(java.util.Properties defaults)
defaults
- DOCUMENT ME!Method Detail |
---|
public int getIntProperty(java.lang.String key) throws java.lang.NumberFormatException
key
- Name of key to query value for
java.lang.NumberFormatException
Properties.getProperty(String)
public double getDoubleProperty(java.lang.String key) throws java.lang.NumberFormatException
key
- Name of key to query value for
java.lang.NumberFormatException
Properties.getProperty(String)
public java.lang.Class getClassProperty(java.lang.String key)
Class
instace
specified by fully qualified string.
key
- Name of key associated with value.
Class
or null if not found.Properties.getProperty(String)
public ExtendedProperties getProperties(java.lang.String mementoName)
mementoName
. For
example if this object has 'window.x', 'window.y' and 'something else'
properties then invoking getProperties("window") will return
ExtendedProperties with anly 'x' and 'y' properties.
mementoName
- name to extract from this properties
public void setProperties(java.lang.String mementoName, ExtendedProperties ep)
mementoName
.
mementoName
- ep
- public void load(java.net.URL resource) throws java.io.IOException, java.net.MalformedURLException
java.io.IOException
java.net.MalformedURLException
public void load(java.io.InputStream inStream) throws java.io.IOException
load
in class java.util.Properties
java.io.IOException
public void checkForLinks(java.net.URL resource) throws java.io.IOException, java.net.MalformedURLException
java.io.IOException
java.net.MalformedURLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |