Package org.easymock.internal
Class EasyMockProperties
- java.lang.Object
-
- org.easymock.internal.EasyMockProperties
-
public final class EasyMockProperties extends java.lang.Object
Contains properties used by EasyMock to change its default behavior. The loading order is (any step being able to overload the properties of the previous step):- easymock.properties in classpath default package
- explicit call to setProperty
-
-
Field Summary
Fields Modifier and Type Field Description private static EasyMockProperties
instance
private static java.lang.String
PREFIX
private java.util.Properties
properties
-
Constructor Summary
Constructors Modifier Constructor Description private
EasyMockProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.ClassLoader
getClassLoader()
static EasyMockProperties
getInstance()
java.lang.String
getProperty(java.lang.String key)
Searches for the property with the specified key.java.lang.String
getProperty(java.lang.String key, java.lang.String defaultValue)
Searches for the property with the specified key.private void
loadEasyMockProperties(java.lang.String propertyFileName)
java.lang.String
setProperty(java.lang.String key, java.lang.String value)
Add a value referenced by the provided key.
-
-
-
Field Detail
-
PREFIX
private static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
instance
private static volatile EasyMockProperties instance
-
properties
private final java.util.Properties properties
-
-
Method Detail
-
getInstance
public static EasyMockProperties getInstance()
-
loadEasyMockProperties
private void loadEasyMockProperties(java.lang.String propertyFileName)
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
Searches for the property with the specified key. If the key is not found, return the default value.- Parameters:
key
- key leading to the propertydefaultValue
- the value to be returned if the key isn't found- Returns:
- the value found for the key or the default value
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Searches for the property with the specified key. Return null if the key is not found.- Parameters:
key
- key leading to the property- Returns:
- the value found for the key or null
-
setProperty
public java.lang.String setProperty(java.lang.String key, java.lang.String value)
Add a value referenced by the provided key. A null value will remove the key- Parameters:
key
- the key of the new propertyvalue
- the value corresponding to key.- Returns:
- the property previous value
-
getClassLoader
private java.lang.ClassLoader getClassLoader()
-
-