net.sf.qualitytest.blueprint.strategy.creation
Class SingleValueCreationStrategy<T>
java.lang.Object
net.sf.qualitytest.blueprint.strategy.creation.ValueCreationStrategy<T>
net.sf.qualitytest.blueprint.strategy.creation.SingleValueCreationStrategy<T>
- Type Parameters:
T
- a specific type
- All Implemented Interfaces:
- CreationStrategy<T>
public class SingleValueCreationStrategy<T>
- extends ValueCreationStrategy<T>
Always use the same value. This strategy simply returns the same instance of the same object every time it is called.
- Author:
- Dominik Seichter
Method Summary |
T |
createValue(Class<?> expectedClass)
Create a new value which can be assigned to an attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleValueCreationStrategy
public SingleValueCreationStrategy(T obj)
createValue
public T createValue(Class<?> expectedClass)
- Description copied from class:
ValueCreationStrategy
- Create a new value which can be assigned to an attribute.
- Specified by:
createValue
in class ValueCreationStrategy<T>
- Parameters:
expectedClass
- which is requested.
- Returns:
- a new value
Copyright © 2012-2013. All Rights Reserved.