public interface Factory
Factory
represents the type for factories of bootstrap services.
Factories are used when it is not possible to describe directly an element in the
Kernel.xml configuration file. In this case, factories may be used. A factory should
implement the Factory
interface and have a public no-arg constructor.
The factory is registered in the configuration file using a FACTORY
construct stipulating the name of the context element to construct and the
java class name of the factory.
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
newObject(Context c)
Returns an object created using information contained in the provided
context . |
java.lang.Object newObject(Context c) throws JonathanException
context
.context
- a Context
object;context
.JonathanException
- if something goes wrong.