Package com.helger.commons.factory
Class FactoryNewInstance<DATATYPE>
java.lang.Object
com.helger.commons.factory.FactoryNewInstance<DATATYPE>
- Type Parameters:
DATATYPE- The return type of the factory
- All Implemented Interfaces:
Supplier<DATATYPE>
Implementation of
Supplier that always creates a new instance via
reflection- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionFactoryNewInstance(Class<? extends DATATYPE> aClass, boolean bCheckInstancable) -
Method Summary
Modifier and TypeMethodDescriptionstatic <DATATYPE> FactoryNewInstance<DATATYPE> static <DATATYPE> FactoryNewInstance<DATATYPE> booleanget()inthashCode()toString()
-
Constructor Details
-
FactoryNewInstance
-
-
Method Details
-
getFactoryClass
-
get
-
equals
-
hashCode
public int hashCode() -
toString
-
create
@Nonnull public static <DATATYPE> FactoryNewInstance<DATATYPE> create(@Nullable Class<DATATYPE> aClass) -
create
@Nonnull public static <DATATYPE> FactoryNewInstance<DATATYPE> create(@Nullable Class<DATATYPE> aClass, boolean bCheckInstancable)
-