Package org.eclipse.jetty.start
Class Props
- java.lang.Object
-
- org.eclipse.jetty.start.Props
-
- All Implemented Interfaces:
Iterable<Props.Prop>
public final class Props extends Object implements Iterable<Props.Prop>
Management of Properties.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProps.Prop
-
Field Summary
Fields Modifier and Type Field Description static StringORIGIN_SYSPROP
-
Constructor Summary
Constructors Constructor Description Props()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAll(Props other)booleanaddPossibleProperty(String arg, String source)Add a potential argument as a property.StringcleanReference(String property)booleancontainsKey(String key)Stringexpand(String str)Props.PropgetProp(String key)Props.PropgetProp(String key, boolean searchSystemProps)StringgetString(String key)StringgetString(String key, String defVal)static StringgetValue(String arg)static List<String>getValues(String arg)static booleanhasPropertyKey(String name)Iterator<Props.Prop>iterator()voidreset()voidsetProperty(String key, String value, String origin)voidsetProperty(Props.Prop prop)voidsetSystemProperty(String key, String value)intsize()voidstore(OutputStream stream, String comments)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
ORIGIN_SYSPROP
public static final String ORIGIN_SYSPROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
addAll
public void addAll(Props other)
-
addPossibleProperty
public boolean addPossibleProperty(String arg, String source)
Add a potential argument as a property.If arg is not a property, ignore it.
- Parameters:
arg- the argument to parse for a potential propertysource- the source for this argument (to track origin of property from)- Returns:
- true if the property was added, false if the property wasn't added
-
containsKey
public boolean containsKey(String key)
-
getProp
public Props.Prop getProp(String key)
-
getProp
public Props.Prop getProp(String key, boolean searchSystemProps)
-
hasPropertyKey
public static boolean hasPropertyKey(String name)
-
iterator
public Iterator<Props.Prop> iterator()
- Specified by:
iteratorin interfaceIterable<Props.Prop>
-
reset
public void reset()
-
setProperty
public void setProperty(Props.Prop prop)
-
size
public int size()
-
store
public void store(OutputStream stream, String comments) throws IOException
- Throws:
IOException
-
-