Class FactoryBasedInstantiator<T>

java.lang.Object
de.cuioss.test.valueobjects.objects.impl.AbstractOrderedArgsInstantiator<T>
de.cuioss.test.valueobjects.objects.impl.FactoryBasedInstantiator<T>
Type Parameters:
T - identifying the type of objects to be created
All Implemented Interfaces:
ParameterizedInstantiator<T>

This ParameterizedInstantiator uses a factory method derived by the given RuntimeProperties#getAllProperties() in order to instantiate Objects
Author:
Oliver Wolff
  • Constructor Details

    • FactoryBasedInstantiator

      public FactoryBasedInstantiator(Class<T> type, RuntimeProperties runtimeProperties, Class<?> enclosingType, String factoryMethodName)
      Constructor.
      Parameters:
      type - the type of the object to be created
      runtimeProperties - must not be null. defines the attributes in the exact order to be used for the constructor: RuntimeProperties#getAllProperties()
      enclosingType - the type providing the factory method, usually the target type to be created, must not be null
      factoryMethodName - the name of the factory method, must not be null, nor empty.
  • Method Details