Package de.cuioss.test.generator.impl
Class DecoratorGenerator<T>
- java.lang.Object
-
- de.cuioss.test.generator.impl.DecoratorGenerator<T>
-
- Type Parameters:
T- identifying the type of elements to be generated
- All Implemented Interfaces:
TypedGenerator<T>
public class DecoratorGenerator<T> extends Object implements TypedGenerator<T>
Wrapper for decorating an already existingTypedGenerator. This is usually used for modeling corner cases.- Author:
- Oliver Wolff
-
-
Constructor Summary
Constructors Constructor Description DecoratorGenerator(@NonNull Class<T> type, @NonNull TypedGenerator<T> decorator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull TypedGenerator<T>getDecorator()@NonNull Class<T>getType()Tnext()Generates the next instance.StringtoString()
-
-
-
Constructor Detail
-
DecoratorGenerator
public DecoratorGenerator(@NonNull @NonNull Class<T> type, @NonNull @NonNull TypedGenerator<T> decorator)
-
-
Method Detail
-
next
public T next()
Description copied from interface:TypedGeneratorGenerates the next instance.- Specified by:
nextin interfaceTypedGenerator<T>- Returns:
- a newly created instance
-
getType
@NonNull public @NonNull Class<T> getType()
- Specified by:
getTypein interfaceTypedGenerator<T>- Returns:
- class information; which type this generator is responsible for.
-
getDecorator
@NonNull public @NonNull TypedGenerator<T> getDecorator()
-
-