Class PropertyBundle

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

public class PropertyBundle extends Object
Author:
pugh
  • Constructor Details

    • PropertyBundle

      public PropertyBundle()
    • PropertyBundle

      public PropertyBundle(Properties properties)
  • Method Details

    • copy

      public PropertyBundle copy()
    • getProperties

      public Properties getProperties()
    • loadPropertiesFromString

      public void loadPropertiesFromString(String contents)
    • loadPropertiesFromURL

      public void loadPropertiesFromURL(URL url)
    • loadProperties

      public void loadProperties(Properties properties)
    • getBoolean

      public boolean getBoolean(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(String name, boolean defaultValue)
    • getInt

      public 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 String getOSDependentProperty(String name)
      Parameters:
      name - property name
      Returns:
      string value (or null if the property does not exist)
    • getProperty

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

      public void setProperty(String name, String value)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProperty

      public 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 String rewriteURLAccordingToProperties(String u)