public class PropertyLoader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DFLT_ETN |
Constructor and Description |
---|
PropertyLoader() |
Modifier and Type | Method and Description |
---|---|
static java.util.HashMap<java.lang.String,java.lang.String> |
getPropertiesWithSubstitutions(java.lang.String name)
Checks classpath for a properties file 'name'
Works with either '.' separator or '/' separator and with or without '.properties' extension
if the .properties file contains things like keyX=bar, keyY=${keyX}foo
then the ${keyX} will be substituted with the keyX value
|
static java.util.Properties |
loadProperties(java.lang.String name)
loads the properties file 'name' from the classpath - default class loader it is very
permissive in how the name is formated - it can have the '.properties' extension or not it can
use either '.' or '/' as a separator there can be a leading '/' or not Example: Properties mine
= PropertyLoader.loadProperties("com.ibm.bluej.mypackage.myprops") loads 'myprops.properties'
from a directory like com/ibm/bluej/mypackage in the classpath
|
static void |
main(java.lang.String[] args) |
public static final java.lang.String DFLT_ETN
public static java.util.HashMap<java.lang.String,java.lang.String> getPropertiesWithSubstitutions(java.lang.String name)
name
- qualified name of properties filepublic static java.util.Properties loadProperties(java.lang.String name)
name
- public static void main(java.lang.String[] args)