Class StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
- java.lang.Object
-
- dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
-
- All Implemented Interfaces:
StatefulAggregateInstanceFactory
- Enclosing interface:
- StatefulAggregateInstanceFactory
public static class StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory extends Object implements StatefulAggregateInstanceFactory
StatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.StatefulAggregateInstanceFactory
StatefulAggregateInstanceFactory.ObjenesisAggregateInstanceFactory, StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
-
-
Field Summary
-
Fields inherited from interface dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.StatefulAggregateInstanceFactory
DEFAULT_REFLECTION_BASED_CONSTRUCTOR_AGGREGATE_ROOT_FACTORY, OBJENESIS_AGGREGATE_ROOT_FACTORY
-
-
Constructor Summary
Constructors Constructor Description ReflectionBasedAggregateInstanceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <ID,AGGREGATE>
AGGREGATEcreate(ID id, Class<AGGREGATE> aggregateType)Create an instance of theAggregate
-
-
-
Method Detail
-
create
public <ID,AGGREGATE> AGGREGATE create(ID id, Class<AGGREGATE> aggregateType)Description copied from interface:StatefulAggregateInstanceFactoryCreate an instance of theAggregate- Specified by:
createin interfaceStatefulAggregateInstanceFactory- Type Parameters:
ID- the type of aggregate idAGGREGATE- theAggregateimplementation type- Parameters:
id- the id valueaggregateType- theAggregateimplementation type- Returns:
- new aggregate instance
-
-