Class DynamicProxyGenerator<T>
java.lang.Object
de.cuioss.test.valueobjects.generator.dynamic.impl.DynamicProxyGenerator<T>
- Type Parameters:
T
- the type of objects to be generated
- All Implemented Interfaces:
de.cuioss.test.generator.TypedGenerator<T>
public class DynamicProxyGenerator<T>
extends Object
implements de.cuioss.test.generator.TypedGenerator<T>
Creates proxies using javassist for any type given that is not an interface
nor annotation nor enum.
- Author:
- Oliver Wolff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final <T> Optional<de.cuioss.test.generator.TypedGenerator<T>>
getGeneratorForType
(Class<T> type) Factory method for creating an instance ofDynamicProxyGenerator
.getType()
next()
-
Constructor Details
-
DynamicProxyGenerator
public DynamicProxyGenerator()
-
-
Method Details
-
next
- Specified by:
next
in interfacede.cuioss.test.generator.TypedGenerator<T>
-
getType
- Specified by:
getType
in interfacede.cuioss.test.generator.TypedGenerator<T>
-
getGeneratorForType
public static final <T> Optional<de.cuioss.test.generator.TypedGenerator<T>> getGeneratorForType(Class<T> type) Factory method for creating an instance ofDynamicProxyGenerator
. It only works for any type given that is not an interface nor annotation nor enum.- Parameters:
type
- to be checked,- Returns:
- an
Optional
on the correspondingTypedGenerator
if the given type is applicable, otherwiseOptional.empty()
-