public class LoadList extends Object
Our list of references from which to load properties. The list can contain externalized files, internal files within the classpath (such as in a jar file) and even direct name value pairs. Localization is supported, just set attributes.locale to the appropriate locale.
| Modifier and Type | Field and Description |
|---|---|
protected Attributes |
attribs |
protected List<PropertiesReference> |
list |
protected Properties |
props |
| Constructor and Description |
|---|
LoadList() |
LoadList(Attributes attribs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addReference(File file)
This is understood as a shortcut for
PropertiesReference(ReferenceType.EXTERNAL,fileloc);
|
void |
addReference(PropertiesReference ref) |
void |
addReference(ReferenceType type,
String path) |
Attributes |
getAttribs() |
List<PropertiesReference> |
getList() |
Properties |
getProps() |
void |
load() |
private void |
loadFromClasspath(String path) |
private void |
loadFromDirect(String data) |
private void |
loadFromFile(String path) |
private void |
loadFromSystemProps(String key) |
protected final List<PropertiesReference> list
protected final Properties props
protected final Attributes attribs
public LoadList()
public LoadList(Attributes attribs)
public void addReference(File file)
file - public void addReference(ReferenceType type, String path)
public void addReference(PropertiesReference ref)
public void load()
private void loadFromSystemProps(String key)
private void loadFromClasspath(String path)
private void loadFromDirect(String data)
private void loadFromFile(String path)
public List<PropertiesReference> getList()
public Properties getProps()
public Attributes getAttribs()
Copyright © 2011-2014 David R. Smith. All Rights Reserved.