P - Type of the produced object.public abstract class BaseFactory<P extends Producible> extends Object implements Factory<P>
Factory.
This base implementation provides generic object creation through the create(Object...) method that will resolve a constructor with the same argument types as its
own and invoke it.
Factory| Modifier | Constructor and Description |
|---|---|
protected |
BaseFactory()
Creates a base domain factory.
|
protected |
BaseFactory(Class<P> producedClass)
Creates a base domain factory.
|
| Modifier and Type | Method and Description |
|---|---|
P |
create(Object... args)
Creates an object instance in a generic way, using the given arguments.
|
Class<P> |
getProducedClass()
Returns the class produced by the factory.
|
protected BaseFactory()
public Class<P> getProducedClass()
FactorygetProducedClass in interface Factory<P extends Producible>public P create(Object... args)
Factorycreate in interface Factory<P extends Producible>args - the arguments for object creation.Copyright © 2013-2018–2019 SeedStack. All rights reserved.