Package edu.umd.cs.findbugs
Class PropertyBundle
- java.lang.Object
-
- edu.umd.cs.findbugs.PropertyBundle
-
public class PropertyBundle extends java.lang.Object- Author:
- pugh
-
-
Constructor Summary
Constructors Constructor Description PropertyBundle()PropertyBundle(java.util.Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyBundlecopy()booleangetBoolean(java.lang.String name)Get boolean property, returning false if a security manager prevents us from accessing system propertiesbooleangetBoolean(java.lang.String name, boolean defaultValue)intgetInt(java.lang.String name, int defaultValue)java.lang.StringgetOSDependentProperty(java.lang.String name)java.util.PropertiesgetProperties()java.lang.StringgetProperty(java.lang.String name)java.lang.StringgetProperty(java.lang.String name, java.lang.String defaultValue)voidloadProperties(java.util.Properties properties)voidloadPropertiesFromString(java.lang.String contents)voidloadPropertiesFromURL(java.net.URL url)java.lang.StringrewriteURLAccordingToProperties(java.lang.String u)voidsetProperty(java.lang.String name, java.lang.String value)java.lang.StringtoString()
-
-
-
Method Detail
-
copy
public PropertyBundle copy()
-
getProperties
public java.util.Properties getProperties()
-
loadPropertiesFromString
public void loadPropertiesFromString(java.lang.String contents)
-
loadPropertiesFromURL
public void loadPropertiesFromURL(java.net.URL url)
-
loadProperties
public void loadProperties(java.util.Properties properties)
-
getBoolean
public 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 boolean getBoolean(java.lang.String name, boolean defaultValue)
-
getInt
public 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 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 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 void setProperty(java.lang.String name, java.lang.String value)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getProperty
public 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 java.lang.String rewriteURLAccordingToProperties(java.lang.String u)
-
-