Class PropUtil


  • final class PropUtil
    extends java.lang.Object
    Utilities to make it easier to get property values. Properties can be strings or type-specific value objects.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PropUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static boolean getBoolean​(java.lang.Object value, boolean def)
      Interpret the value object as a boolean, returning def if unable.
      static boolean getBooleanSystemProperty​(java.lang.String name, boolean def)
      Get a boolean valued System property.
      private static java.lang.Object getProp​(java.util.Properties props, java.lang.String name)
      Get the value of the specified property.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropUtil

        private PropUtil()
    • Method Detail

      • getBooleanSystemProperty

        public static boolean getBooleanSystemProperty​(java.lang.String name,
                                                       boolean def)
        Get a boolean valued System property.
      • getProp

        private static java.lang.Object getProp​(java.util.Properties props,
                                                java.lang.String name)
        Get the value of the specified property. If the "get" method returns null, use the getProperty method, which might cascade to a default Properties object.
      • getBoolean

        private static boolean getBoolean​(java.lang.Object value,
                                          boolean def)
        Interpret the value object as a boolean, returning def if unable.