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.

  • Field Details

  • Constructor Details

    • Props

      public Props()
  • Method Details

    • getValue

      public static String getValue(String arg)
    • getValues

      public static List<String> getValues(String arg)
    • 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 property
      source - 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
    • cleanReference

      public String cleanReference(String property)
    • containsKey

      public boolean containsKey(String key)
    • expand

      public String expand(String str)
    • getProp

      public Props.Prop getProp(String key)
    • getProp

      public Props.Prop getProp(String key, boolean searchSystemProps)
    • getString

      public String getString(String key)
    • getString

      public String getString(String key, String defVal)
    • hasPropertyKey

      public static boolean hasPropertyKey(String name)
    • iterator

      public Iterator<Props.Prop> iterator()
      Specified by:
      iterator in interface Iterable<Props.Prop>
    • reset

      public void reset()
    • setProperty

      public void setProperty(Props.Prop prop)
    • setProperty

      public void setProperty(String key, String value, String origin)
    • size

      public int size()
    • store

      public void store(OutputStream stream, String comments) throws IOException
      Throws:
      IOException
    • setSystemProperty

      public void setSystemProperty(String key, String value)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • load

      public static Props load(ClassLoader classLoader, String resourceName)
    • load

      public static Props load(URL url)