Class SystemInfo

  • public class SystemInfo
    extends java.lang.Object
    Utility class for checking Java system properties.
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isEnabled​(java.lang.String systemProperty)
      Checks whether a System.getProperty(String) is enabled.
      static boolean isIIS()  
      • Methods inherited from class java.lang.Object

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

      • SystemInfo

        public SystemInfo()
    • Method Detail

      • isIIS

        public static boolean isIIS()
        whether the application is run from IIS
      • isEnabled

        public static boolean isEnabled​(java.lang.String systemProperty)
        Checks whether a System.getProperty(String) is enabled. If a property is explicitly set to "1" or "true" or simply defined without any parameters, it is considered enabled. For example for "someProperty":
        • Enabled: -DsomeProperty -DsomeProperty=1 -DsomeProperty=true -DsomeProperty=abc
        • Disabled: -DsomeProperty=0 -DsomeProperty=false
        systemProperty - Key name of the system property
        whether property is enabled