Class 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.

    • Constructor Detail

      • Props

        public Props()
    • 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 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)
      • getProp

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

        public static boolean hasPropertyKey​(String name)
      • reset

        public void reset()
      • setProperty

        public void setProperty​(Props.Prop prop)
      • size

        public int size()
      • setSystemProperty

        public void setSystemProperty​(String key,
                                      String value)