Package dk.eSoftware.commandLineParser
Class AbstractInstanceCreatingConfiguration<T>
- java.lang.Object
-
- dk.eSoftware.commandLineParser.AbstractInstanceCreatingConfiguration<T>
-
- Type Parameters:
T- the configurable class. Must have constructor with 1 arg being T
- All Implemented Interfaces:
Configuration,InstanceCreatingConfiguration<T>
public abstract class AbstractInstanceCreatingConfiguration<T> extends java.lang.Object implements InstanceCreatingConfiguration<T>
Implementation ofInstanceCreatingConfigurationwith implementation ofproduceInstancecreating new instance using single-arg constructor, taking only a configuration, using reflection
-
-
Constructor Summary
Constructors Constructor Description AbstractInstanceCreatingConfiguration(java.lang.Class<T> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TproduceInstance()Produces a newly instantiated instance of the configured class, defined byT
-
-
-
Constructor Detail
-
AbstractInstanceCreatingConfiguration
public AbstractInstanceCreatingConfiguration(java.lang.Class<T> clazz)
- Parameters:
clazz- class object ofT
-
-
Method Detail
-
produceInstance
public T produceInstance()
Description copied from interface:InstanceCreatingConfigurationProduces a newly instantiated instance of the configured class, defined byT- Specified by:
produceInstancein interfaceInstanceCreatingConfiguration<T>- Returns:
- a newly created instance of the class this configures
-
-