edu.umd.cs.findbugs
Class SystemProperties
java.lang.Object
edu.umd.cs.findbugs.SystemProperties
public class SystemProperties
- extends java.lang.Object
- Author:
- pugh
Method Summary |
static boolean |
getBoolean(java.lang.String name)
Get boolean property, returning false if a security manager prevents us
from accessing system properties |
static 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. Use getInt(String,int) instead |
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 any URL |
static java.lang.String |
rewriteURLAccordingToProperties(java.lang.String u)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASSERTIONS_ENABLED
public static final boolean ASSERTIONS_ENABLED
SystemProperties
public SystemProperties()
loadPropertiesFromURL
public static void loadPropertiesFromURL(java.net.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(java.lang.String name)
- Get boolean property, returning false if a security manager prevents us
from accessing system properties
- Returns:
- true if the property exists and is set to true
getBoolean
public static boolean getBoolean(java.lang.String name,
boolean defaultValue)
getInteger
public static java.lang.Integer getInteger(java.lang.String arg0,
int arg1)
- Deprecated. Use
getInt(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)
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)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.