org.objectweb.fractal.adl
Interface Factory
- BasicFactory
A component factory.
Object | newComponent(String name, Map context) - Creates a new instance of the component whose name is given.
|
newComponent
public Object newComponent(String name,
Map context)
throws ADLException
Creates a new instance of the component whose name is given. This can be
done by loading the ADL definition of this name, by compiling it into a
set of tasks and by executing these tasks in the proper order.
name
- the name of the component to be created.context
- optional additional information.
- the component that has been created. The type of this result
depends on the implementation of this interface: it can be a Fractal
component reference (if this factory creates Fractal components), it
can be an identifier (if this factory generates source code that will
create components, instead of directly creating components), etc.
ADLException
- if a problem occurs during the creation of the
component.