net.sf.qualitytest.blueprint.strategy.creation
Class ValueCreationStrategy<T>

java.lang.Object
  extended by net.sf.qualitytest.blueprint.strategy.creation.ValueCreationStrategy<T>
All Implemented Interfaces:
CreationStrategy<T>
Direct Known Subclasses:
BlueprintStringCreationStrategy, DefaultEnumCreationStrategy, NullValueCreationStrategy, RandomBooleanValueCreationStrategy, RandomByteValueCreationStrategy, RandomCharValueCreationStrategy, RandomDoubleValueCreationStrategy, RandomEnumCreationStrategy, RandomFloatValueCreationStrategy, RandomIntValueCreationStrategy, RandomLongValueCreationStrategy, RandomShortValueCreationStrategy, SingleValueCreationStrategy

public abstract class ValueCreationStrategy<T>
extends Object
implements CreationStrategy<T>

Definition of an interface to create values for attribute assignments.

Author:
Dominik Seichter

Constructor Summary
ValueCreationStrategy()
           
 
Method Summary
abstract  T createValue(Class<?> expectedClazz)
          Create a new value which can be assigned to an attribute.
 T createValue(Class<?> expectedClazz, BlueprintConfiguration config, BlueprintSession session)
          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
 

Constructor Detail

ValueCreationStrategy

public ValueCreationStrategy()
Method Detail

createValue

public abstract T createValue(Class<?> expectedClazz)
Create a new value which can be assigned to an attribute.

Type Parameters:
T - Type parameter of the return type
Parameters:
expectedClazz - which is requested.
Returns:
a new value

createValue

public T createValue(Class<?> expectedClazz,
                     BlueprintConfiguration config,
                     BlueprintSession session)
Create a new value which can be assigned to an attribute.

Specified by:
createValue in interface CreationStrategy<T>
Type Parameters:
T - Type parameter of the return type
Parameters:
expectedClazz - which is requested.
config - a BlueprintConfiguration
session - A BlueprintSession * @return a new value


Copyright © 2012-2013. All Rights Reserved.