T - The type of object that should be created by the dummy factory.public class ClassBasedFactory<T> extends LoremIpsumObjectFactory<T>
T. First tries to defer creation using classBindings, if no class
bindings can be found for the given type, it will try to determine if a specific factory is needed (for primitives, strings, arrays and
other common types). If no specific factory is applicable, this factory will try to find constructors to create an instance with. Then
any fields are being created the same way.
This class relies on all the other factories to complete creating and fully populating a dummy object of the given type.
| Constructor and Description |
|---|
ClassBasedFactory(Class<T> clazz) |
| Modifier and Type | Method and Description |
|---|---|
T |
_createLoremIpsumObject(@Nullable Type[] nextGenericsMetaData,
Map<String,ClassUsageInfo<?>> knownInstances,
LoremIpsumConfig loremIpsumConfig,
List<Exception> exceptions)
Will try to create a new object for the given type, while maintaining a track record of already created - and - populated objects to
avoid recursive loops.
|
createLoremIpsumObject, createLoremIpsumObject, createLoremIpsumObject, isValidForType@Nullable public T _createLoremIpsumObject(@Nullable @Nullable Type[] nextGenericsMetaData, Map<String,ClassUsageInfo<?>> knownInstances, LoremIpsumConfig loremIpsumConfig, List<Exception> exceptions)
Will first try to defer dummy object creation to a bound LoremIpsumObjectFactory and if found will defer dummy object creation to
LoremIpsumObjectFactory.createLoremIpsumObject(LoremIpsumConfig).
nextGenericsMetaData - See LoremIpsumObjectFactory.createLoremIpsumObject(Type[], Map, LoremIpsumConfig, List).knownInstances - See LoremIpsumObjectFactory.createLoremIpsumObject(Type[], Map, LoremIpsumConfig, List).loremIpsumConfig - See LoremIpsumObjectFactory.createLoremIpsumObject(Type[], Map, LoremIpsumConfig, List).exceptions - See LoremIpsumObjectFactory.createLoremIpsumObject(Type[], Map, LoremIpsumConfig, List).ClassBindings are configured).IllegalArgumentException - Thrown if class could not be instantiated. Constructor invocation exceptions are logged separately.Copyright © 2019–2020. All rights reserved.