public final class Instantiators
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Instantiators.OngoingInstantiatorCreation<T>
Part of a fluent API to create Instantiators with one arguments.
|
Modifier and Type | Method and Description |
---|---|
static <T> Instantiators.OngoingInstantiatorCreation<T> |
instantiatorFor(java.lang.Class<T> instanceClass)
Starting point for fluent clauses to create instantiators for certain type of objects.
|
public static <T> Instantiators.OngoingInstantiatorCreation<T> instantiatorFor(java.lang.Class<T> instanceClass)
Instantiator<Argument, Instance> instantiator = instantiatorFor(Instance.class)
.withArgumentType(Argument.class);
Instance instance = instantiator.create(anArgument); // anArgument being of type Argument
instanceClass
- the type of the objects to be created by the instantiator