public class PropertyBasedSettings extends Settings
Properties
class.
The keys values are case-sensitive.Constructor and Description |
---|
PropertyBasedSettings()
Constructor.
|
PropertyBasedSettings(Properties properties)
Constructor.
|
PropertyBasedSettings(String... resources)
Constructor.
|
PropertyBasedSettings(String resource)
Constructor.
|
PropertyBasedSettings(String name,
boolean isFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
loadAsFile(String fileName)
Loads settings from the file system resource.
|
void |
loadAsResource(String resourceName)
Loads settings from the classpath resource.
|
getBoolean, getBoolean, getInteger, getInteger, getLong, getLong, getString, getString, isDefined, setBoolean, setBoolean, setInteger, setInteger, setLong, setLong, setString, setString
public PropertyBasedSettings()
public PropertyBasedSettings(Properties properties)
properties
- properties to init settings withpublic PropertyBasedSettings(String... resources)
Loads settings resource using default lookup schema.
resources
- resource name to load and init settings withpublic PropertyBasedSettings(String resource)
Loads settings resource using default lookup schema.
resource
- resource name to load and init settings withpublic PropertyBasedSettings(String name, boolean isFile)
name
- resource or file name to load and init settings withisFile
- flag to define whether the specified name is file or resourcepublic void loadAsFile(String fileName)
fileName
- file with settings to loadpublic void loadAsResource(String resourceName)
resourceName
- resource name with settings to loadCopyright © 2005–2024 Onix Solutions. All rights reserved.