DATATYPE - The return type of the factorypublic class FactoryNewInstance<DATATYPE> extends Object implements IFactory<DATATYPE>, Serializable
IFactory that always creates a new instance via
reflection| Constructor and Description |
|---|
FactoryNewInstance(Class<? extends DATATYPE> aClass,
boolean bCheckInstancable) |
| Modifier and Type | Method and Description |
|---|---|
DATATYPE |
create()
Create an object of the desired type.
|
static <DATATYPE> FactoryNewInstance<DATATYPE> |
create(Class<DATATYPE> aClass) |
static <DATATYPE> FactoryNewInstance<DATATYPE> |
create(Class<DATATYPE> aClass,
boolean bCheckInstancable) |
boolean |
equals(Object o) |
Class<? extends DATATYPE> |
getFactoryClass() |
int |
hashCode() |
String |
toString() |
@Nullable public DATATYPE create()
IFactory@Nonnull public static <DATATYPE> FactoryNewInstance<DATATYPE> create(@Nullable Class<DATATYPE> aClass)
@Nonnull public static <DATATYPE> FactoryNewInstance<DATATYPE> create(@Nullable Class<DATATYPE> aClass, boolean bCheckInstancable)
Copyright © 2014–2015 Philip Helger. All rights reserved.