Class SystemProperties

java.lang.Object
edu.umd.cs.findbugs.SystemProperties

public class SystemProperties extends Object
Author:
pugh
  • Field Details

    • ASSERTIONS_ENABLED

      public static final boolean ASSERTIONS_ENABLED
    • RUNNING_IN_ECLIPSE

      public static final boolean RUNNING_IN_ECLIPSE
    • RUNNING_AS_IDE_PLUGIN

      public static final boolean RUNNING_AS_IDE_PLUGIN
  • Constructor Details

    • SystemProperties

      public SystemProperties()
  • Method Details

    • getLocalProperties

      public static Properties getLocalProperties()
    • getAllProperties

      public static Properties getAllProperties()
    • loadPropertiesFromURL

      public static void loadPropertiesFromURL(URL url)
      This method is public to allow clients to set system properties via any URL
      Parameters:
      url - an url to load system properties from, may be nullerrorMsg
    • getBoolean

      public static boolean getBoolean(String name)
      Get boolean property, returning false if a security manager prevents us from accessing system properties

      (incomplete) list of known system properties

      • "report_TESTING_pattern_in_standard_detectors" - default is false
      Returns:
      true if the property exists and is set to true
    • getBoolean

      public static boolean getBoolean(String name, boolean defaultValue)
    • getInteger

      @Deprecated public static Integer getInteger(String arg0, int arg1)
      Deprecated.
      Use getInt(String,int) instead
      Parameters:
      arg0 - property name
      arg1 - default value
      Returns:
      the int value (or arg1 if the property does not exist)
    • getInt

      public static int getInt(String name, int defaultValue)
      Parameters:
      name - property name
      defaultValue - default value
      Returns:
      the int value (or defaultValue if the property does not exist)
    • getOSDependentProperty

      public static String getOSDependentProperty(String name)
      Parameters:
      name - property name
      Returns:
      string value (or null if the property does not exist)
    • getProperty

      public static String getProperty(String name)
      Parameters:
      name - property name
      Returns:
      string value (or null if the property does not exist)
    • setProperty

      public static void setProperty(String name, String value)
    • getProperty

      public static String getProperty(String name, String defaultValue)
      Parameters:
      name - property name
      defaultValue - default value
      Returns:
      string value (or defaultValue if the property does not exist)
    • rewriteURLAccordingToProperties

      public static String rewriteURLAccordingToProperties(String u)