public final class Props extends Object implements Iterable<Props.Prop>
This is larger in scope than the standard Properties
, as it will also handle tracking the origin of each property, if it was overridden,
and also allowing for ${property}
expansion.
Modifier and Type | Class and Description |
---|---|
static class |
Props.Prop |
Modifier and Type | Field and Description |
---|---|
static String |
ORIGIN_SYSPROP |
Constructor and Description |
---|
Props() |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Props other) |
void |
addPossibleProperty(String arg,
String source)
Add a potential argument as a property.
|
String |
cleanReference(String property) |
boolean |
containsKey(String key) |
String |
expand(String str) |
String |
expand(String str,
Stack<String> seenStack) |
Props.Prop |
getProp(String key) |
Props.Prop |
getProp(String key,
boolean searchSystemProps) |
String |
getString(String key) |
String |
getString(String key,
String defVal) |
static String |
getValue(String arg) |
static List<String> |
getValues(String arg) |
Iterator<Props.Prop> |
iterator() |
void |
reset() |
void |
setProperty(Props.Prop prop) |
void |
setProperty(String key,
String value,
String origin) |
void |
setSystemProperty(String key,
String value) |
int |
size() |
void |
store(OutputStream stream,
String comments) |
public static final String ORIGIN_SYSPROP
public void addAll(Props other)
public void addPossibleProperty(String arg, String source)
If arg is not a property, ignore it.
arg
- the argument to parse for a potential propertysource
- the source for this argument (to track origin of property from)public boolean containsKey(String key)
public Props.Prop getProp(String key)
public Props.Prop getProp(String key, boolean searchSystemProps)
public Iterator<Props.Prop> iterator()
iterator
in interface Iterable<Props.Prop>
public void reset()
public void setProperty(Props.Prop prop)
public int size()
public void store(OutputStream stream, String comments) throws IOException
IOException
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.