public abstract class Property
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
Property.FilePropertyLookup |
private static class |
Property.SystemPropertyLookup |
private static class |
Property.SystemRedirectsLookup |
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
s_systemFingerprint |
private static java.util.Properties |
s_systemProperties |
private static java.util.Properties |
s_systemRedirects |
Constructor and Description |
---|
Property() |
Modifier and Type | Method and Description |
---|---|
static java.util.Properties |
combine(java.util.Properties overrides,
java.util.Properties base)
NOTE: this does not guarantee that the result will be mutatable
independently from 'overrides' or 'base', so this method
should be used for read-only property only
|
static java.util.Properties |
getAppProperties(java.lang.String namespace,
java.lang.ClassLoader loader)
Creates a set of properties for an application with a given namespace.
|
static java.util.Properties |
getLazyPropertiesFromFile(java.io.File file)
Returns a lazy property implementation that will read 'load' as a .properties
file on first use.
|
static java.util.Properties |
getProperties(java.lang.String name)
does not throw
|
static java.util.Properties |
getProperties(java.lang.String name,
java.lang.ClassLoader loader)
does not throw
|
static java.util.Properties |
getPropertiesFromFile(java.io.File file)
Loads 'file' as a .properties file.
|
static java.lang.String |
getSystemFingerprint() |
static java.util.Properties |
getSystemProperties(java.lang.String systemPrefix) |
static java.lang.String |
getSystemProperty(java.lang.String key) |
static java.lang.String |
getSystemProperty(java.lang.String key,
java.lang.String def) |
static java.util.Properties |
getSystemPropertyRedirects(java.util.Map systemRedirects) |
static boolean |
toBoolean(java.lang.String value) |
private static java.lang.String s_systemFingerprint
private static java.util.Properties s_systemProperties
private static java.util.Properties s_systemRedirects
public static boolean toBoolean(java.lang.String value)
public static java.util.Properties combine(java.util.Properties overrides, java.util.Properties base)
overrides
- [null is equivalent to empty]base
- [null is equivalent to empty]public static java.util.Properties getAppProperties(java.lang.String namespace, java.lang.ClassLoader loader)
namespace
- application namespace [may not be null]loader
- classloader to use for any classloader resource lookups
[null is equivalent to the applicaton classloader]public static java.util.Properties getSystemProperties(java.lang.String systemPrefix)
public static java.util.Properties getSystemPropertyRedirects(java.util.Map systemRedirects)
public static java.lang.String getSystemFingerprint()
public static java.lang.String getSystemProperty(java.lang.String key)
public static java.lang.String getSystemProperty(java.lang.String key, java.lang.String def)
public static java.util.Properties getProperties(java.lang.String name)
name
- public static java.util.Properties getProperties(java.lang.String name, java.lang.ClassLoader loader)
name
- loader
- public static java.util.Properties getPropertiesFromFile(java.io.File file) throws java.io.IOException
file
- [may not be null]java.io.IOException
- on any file I/O errorspublic static java.util.Properties getLazyPropertiesFromFile(java.io.File file)
file
- [can be null, which results in an empty property set returned]