public abstract class PropertyLoader
extends java.lang.Object
some.pkg.Resource some.pkg.Resource.properties some/pkg/Resource some/pkg/Resource.properties /some/pkg/Resource /some/pkg/Resource.properties
Modifier and Type | Field and Description |
---|---|
private static boolean |
LOAD_AS_RESOURCE_BUNDLE
The Constant LOAD_AS_RESOURCE_BUNDLE.
|
static java.lang.String |
PROP_FILE
The Constant PROP_FILE.
|
private static java.lang.String |
SUFFIX
The Constant SUFFIX.
|
private static boolean |
THROW_ON_LOAD_FAILURE
The Constant THROW_ON_LOAD_FAILURE.
|
Constructor and Description |
---|
PropertyLoader() |
Modifier and Type | Method and Description |
---|---|
static java.util.Properties |
loadProperties()
A convenience overload of
loadProperties(String)
that uses the current thread's context classloader and the default properties location. |
static java.util.Properties |
loadProperties(java.lang.String name)
A convenience overload of
loadProperties(String, ClassLoader)
that uses the current thread's context classloader. |
static java.util.Properties |
loadProperties(java.lang.String name,
java.lang.ClassLoader loader)
Looks up a resource named 'name' in the classpath.
|
public static final java.lang.String PROP_FILE
private static final boolean THROW_ON_LOAD_FAILURE
private static final boolean LOAD_AS_RESOURCE_BUNDLE
private static final java.lang.String SUFFIX
public static java.util.Properties loadProperties(java.lang.String name, java.lang.ClassLoader loader)
some.pkg.Resource some.pkg.Resource.properties some/pkg/Resource some/pkg/Resource.properties /some/pkg/Resource /some/pkg/Resource.properties
name
- classpath resource name [may not be null]loader
- classloader through which to load the resource [null
is equivalent to the application loader]public static java.util.Properties loadProperties(java.lang.String name)
loadProperties(String, ClassLoader)
that uses the current thread's context classloader.name
- the namepublic static java.util.Properties loadProperties()
loadProperties(String)
that uses the current thread's context classloader and the default properties location.