public abstract class InstanceFactory<T>
extends java.lang.Object
Factory function for new instances.
| Constructor and Description |
|---|
InstanceFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <T> InstanceFactory<T> |
fromConstructor(java.lang.Class<? extends T> cls,
java.lang.Object... args)
Instance factory calling a constructor with arguments.
|
abstract T |
newInstance()
Create a new instance.
|
public abstract T newInstance()
Create a new instance.
public static <T> InstanceFactory<T> fromConstructor(java.lang.Class<? extends T> cls, java.lang.Object... args)
Instance factory calling a constructor with arguments.
cls - The class to instantiate.args - The arguments.T - The instantiated type.cls.