public abstract class Property extends Object
| 构造器和说明 |
|---|
Property() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Properties |
combine(Properties overrides,
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 Properties |
getAppProperties(String namespace,
ClassLoader loader)
Creates a set of properties for an application with a given namespace.
|
static Properties |
getLazyPropertiesFromFile(File file)
Returns a lazy property implementation that will read 'load' as a .properties
file on first use.
|
static Properties |
getProperties(String name)
does not throw
|
static Properties |
getProperties(String name,
ClassLoader loader)
does not throw
|
static Properties |
getPropertiesFromFile(File file)
Loads 'file' as a .properties file.
|
static String |
getSystemFingerprint() |
static Properties |
getSystemProperties(String systemPrefix) |
static String |
getSystemProperty(String key) |
static String |
getSystemProperty(String key,
String def) |
static Properties |
getSystemPropertyRedirects(Map systemRedirects) |
static boolean |
toBoolean(String value) |
public static boolean toBoolean(String value)
public static Properties combine(Properties overrides, Properties base)
overrides - [null is equivalent to empty]base - [null is equivalent to empty]public static Properties getAppProperties(String namespace, 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 Properties getSystemProperties(String systemPrefix)
public static Properties getSystemPropertyRedirects(Map systemRedirects)
public static String getSystemFingerprint()
public static Properties getProperties(String name)
name - public static Properties getProperties(String name, ClassLoader loader)
name - loader - public static Properties getPropertiesFromFile(File file) throws IOException
file - [may not be null]IOException - on any file I/O errorspublic static Properties getLazyPropertiesFromFile(File file)
file - [can be null, which results in an empty property set returned]Copyright © 2018. All rights reserved.