Class SystemProperties


  • public class SystemProperties
    extends Object
    Utility to extract system properties, similar to Integer.getInteger. This class allows to distinguish between a none present value and a malformed value. In case of the latter a log message is produced. Integer.getInteger would just return the defaultValue without informing the user and can therefor lead to hard to find configuration problems.
    • Constructor Detail

      • SystemProperties

        public SystemProperties()
    • Method Detail

      • getLong

        public static Long getLong​(String propertyName)
      • getLong

        public static Long getLong​(String propertyName,
                                   int defaultValue)
      • getLong

        public static Long getLong​(String propertyName,
                                   Long defaultValue)
      • getInteger

        public static Integer getInteger​(String propertyName)
      • getInteger

        public static Integer getInteger​(String propertyName,
                                         int defaultValue)
      • getBooleanWithDefaultAsTrue

        public static Boolean getBooleanWithDefaultAsTrue​(String name)