public interface Factory<ObjectType,ConfigurationType extends Configuration,DependenciesType extends Dependencies>
A factory which can instantiate objects from a Configuration and
run-time Dependencies.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canInstantiate(Configuration conf)
This method tests whether the supplied
Configuration can be
instantiated into an object by this factory. |
ObjectType |
create(ConfigurationType conf,
DependenciesType dependencies)
Creates a new instance based on the provided
Configuration. |
boolean canInstantiate(Configuration conf)
This method tests whether the supplied Configuration can be
instantiated into an object by this factory.
conf - A configuration for an object to be instantiated.true when this factory can create an instance for
the provided configuration.ObjectType create(ConfigurationType conf, DependenciesType dependencies)
Creates a new instance based on the provided Configuration.
Run-time dependencies can be provided through the dependencies type for this factory.
conf - The configuration used to instantiate the object.dependencies - Run-time dependencies for this object.Copyright © 2018. All rights reserved.