Top Description Fields Constructors Methods
org.easymock.internal

public final Class EasyMockProperties

extends Object
Class Inheritance
Imports
java.io.BufferedInputStream, .IOException, .InputStream, java.util.Properties

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):
Author
Henri Tremblay

Field Summary

Modifier and TypeField and Description
private static volatile EasyMockProperties
private static final String
private final Properties

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private ClassLoader
public static EasyMockProperties
public String

Returns:

the value found for the key or the default value
getProperty
(String
key leading to the property
key
,
String
the value to be returned if the key isn't found
defaultValue
)

Searches for the property with the specified key.

public String

Returns:

the value found for the key or null
getProperty
(String
key leading to the property
key
)

Searches for the property with the specified key.

private void
loadEasyMockProperties(String propertyFileName)

public String

Returns:

the property previous value
setProperty
(String
the key of the new property
key
,
String
the value corresponding to key.
value
)

Add a value referenced by the provided key.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instanceback to summary
private static volatile EasyMockProperties instance
PREFIXback to summary
private static final String PREFIX
propertiesback to summary
private final Properties properties

Constructor Detail

EasyMockPropertiesback to summary
private EasyMockProperties()

Method Detail

getClassLoaderback to summary
private ClassLoader getClassLoader()
getInstanceback to summary
public static EasyMockProperties getInstance()
getPropertyback to summary
public String getProperty(String key, String defaultValue)

Searches for the property with the specified key. If the key is not found, return the default value.

Parameters
key:String

key leading to the property

defaultValue:String

the value to be returned if the key isn't found

Returns:String

the value found for the key or the default value

getPropertyback to summary
public String getProperty(String key)

Searches for the property with the specified key. Return null if the key is not found.

Parameters
key:String

key leading to the property

Returns:String

the value found for the key or null

loadEasyMockPropertiesback to summary
private void loadEasyMockProperties(String propertyFileName)
setPropertyback to summary
public String setProperty(String key, String value)

Add a value referenced by the provided key. A null value will remove the key

Parameters
key:String

the key of the new property

value:String

the value corresponding to key.

Returns:String

the property previous value