DATATYPE - The return type of the factorypublic final 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) |
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 © 2006–2014 phloc systems. All rights reserved.