|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.objectweb.jac.core.JacPropTools
This class provides useful primitives to parse Java property files.
| Constructor Summary | |
JacPropTools()
|
|
| Method Summary | |
static void |
fillListStringProps(List vector,
Properties pList,
String propertyName,
boolean force)
Extract a specific vector (ordered) property from a property list. |
static void |
fillMapProps(Map hashTable,
Properties pList,
String propertyName,
int nElements,
boolean force)
Extract a specific hashTable property from a property list. |
static void |
fillSetProps(Set set,
Properties pList,
String propertyName,
boolean trim)
Extract a specific hash set property from a property list. |
static String |
fillStringProp(Properties pList,
String propertyName)
Extracts a specific String property from a property list. |
static Properties |
getPropsFrom(String directory,
String name)
Try to load the property file (propFileName) from the specified directory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JacPropTools()
| Method Detail |
public static void fillListStringProps(List vector,
Properties pList,
String propertyName,
boolean force)
vector - the vetor where all extracted tokens will be
storedpList - the list of all properties from where we will
search the propertypropertyName - the name of the property to parse
public static void fillSetProps(Set set,
Properties pList,
String propertyName,
boolean trim)
set - the set where all extracted tokens will be storedpList - the list of all properties from where we will
search the propertypropertyName - the name of the property to parsetrim - wether to trim ending ".*"
public static void fillMapProps(Map hashTable,
Properties pList,
String propertyName,
int nElements,
boolean force)
hashTable - the hash table where all extracted tokens will
be storedpList - the list of all properties from where we will
search the propertypropertyName - the name of the property to parsenElements - the number of elements attached to a key (the
key is the first element). If nElements==0, the number of
elements attached to the key is variant and must be ending
with a '.'.
public static String fillStringProp(Properties pList,
String propertyName)
pList - the list of all properties from where we will search the propertypropertyName - the name of the property to parse
public static Properties getPropsFrom(String directory,
String name)
directory - the directory where we should, in theory, found the property filename - the name of the property file
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||