Package edu.umd.cs.findbugs
Class SystemProperties
- java.lang.Object
-
- edu.umd.cs.findbugs.SystemProperties
-
public class SystemProperties extends java.lang.Object
- Author:
- pugh
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
ASSERTIONS_ENABLED
static boolean
RUNNING_AS_IDE_PLUGIN
static boolean
RUNNING_IN_ECLIPSE
-
Constructor Summary
Constructors Constructor Description SystemProperties()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Properties
getAllProperties()
static boolean
getBoolean(java.lang.String name)
Get boolean property, returning false if a security manager prevents us from accessing system propertiesstatic boolean
getBoolean(java.lang.String name, boolean defaultValue)
static int
getInt(java.lang.String name, int defaultValue)
static java.lang.Integer
getInteger(java.lang.String arg0, int arg1)
Deprecated.UsegetInt(String,int)
insteadstatic java.util.Properties
getLocalProperties()
static java.lang.String
getOSDependentProperty(java.lang.String name)
static java.lang.String
getProperty(java.lang.String name)
static java.lang.String
getProperty(java.lang.String name, java.lang.String defaultValue)
static void
loadPropertiesFromURL(java.net.URL url)
This method is public to allow clients to set system properties via anyURL
static java.lang.String
rewriteURLAccordingToProperties(java.lang.String u)
static void
setProperty(java.lang.String name, java.lang.String value)
-
-
-
Method Detail
-
getLocalProperties
public static java.util.Properties getLocalProperties()
-
getAllProperties
public static java.util.Properties getAllProperties()
-
loadPropertiesFromURL
public static void loadPropertiesFromURL(java.net.URL url)
This method is public to allow clients to set system properties via anyURL
- Parameters:
url
- an url to load system properties from, may be nullerrorMsg
-
getBoolean
public static boolean getBoolean(java.lang.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(java.lang.String name, boolean defaultValue)
-
getInteger
@Deprecated public static java.lang.Integer getInteger(java.lang.String arg0, int arg1)
Deprecated.UsegetInt(String,int)
instead- Parameters:
arg0
- property namearg1
- default value- Returns:
- the int value (or arg1 if the property does not exist)
-
getInt
public static int getInt(java.lang.String name, int defaultValue)
- Parameters:
name
- property namedefaultValue
- default value- Returns:
- the int value (or defaultValue if the property does not exist)
-
getOSDependentProperty
public static java.lang.String getOSDependentProperty(java.lang.String name)
- Parameters:
name
- property name- Returns:
- string value (or null if the property does not exist)
-
getProperty
public static java.lang.String getProperty(java.lang.String name)
- Parameters:
name
- property name- Returns:
- string value (or null if the property does not exist)
-
setProperty
public static void setProperty(java.lang.String name, java.lang.String value)
-
getProperty
public static java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
- Parameters:
name
- property namedefaultValue
- default value- Returns:
- string value (or defaultValue if the property does not exist)
-
rewriteURLAccordingToProperties
public static java.lang.String rewriteURLAccordingToProperties(java.lang.String u)
-
-