org.objectweb.fractal.julia
Class InitializationContext

java.lang.Object
  extended by org.objectweb.fractal.julia.InitializationContext

public class InitializationContext
extends Object

A context used to initialize Controller objects.

See Also:
initFcController

Field Summary
 Object content
          The content of the component to which the controller object belongs.
 List controllers
          The controllers objects of the component to which the controller object belongs.
 Object hints
          Miscellaneous additional context information.
 Map interfaces
          The external interfaces of the component to which the controller object belongs.
 Map internalInterfaces
          The external interfaces of the component to which the controller object belongs.
 Type type
          The type of the component to which the controller object belongs.
 
Constructor Summary
InitializationContext()
          Constructs an uninitialized InitializationContext object.
 
Method Summary
 void create()
          Initializes and fills in the fields of this object.
 Object getInterface(String name)
          Returns the component interface of the interfaces map whose name is given.
 Object getOptionalInterface(String name)
          Returns the component interface of the interfaces map whose name is given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public Type type
The type of the component to which the controller object belongs.


controllers

public List controllers
The controllers objects of the component to which the controller object belongs.


interfaces

public Map interfaces
The external interfaces of the component to which the controller object belongs.


internalInterfaces

public Map internalInterfaces
The external interfaces of the component to which the controller object belongs.


content

public Object content
The content of the component to which the controller object belongs.


hints

public Object hints
Miscellaneous additional context information.

Constructor Detail

InitializationContext

public InitializationContext()
Constructs an uninitialized InitializationContext object.

Method Detail

create

public void create()
            throws InstantiationException
Initializes and fills in the fields of this object. This method must create the type, the controller objects and the interfaces of a component. The default implementation of this method does nothing.

Throws:
InstantiationException - if the component type, a controller object or a component interface cannot be created.

getInterface

public Object getInterface(String name)
                    throws InstantiationException
Returns the component interface of the interfaces map whose name is given.

Parameters:
name - the name of a component interface.
Returns:
the interface whose name is given.
Throws:
InstantiationException - if there is no such component interface.

getOptionalInterface

public Object getOptionalInterface(String name)
Returns the component interface of the interfaces map whose name is given.

Parameters:
name - the name of a component interface.
Returns:
the interface whose name is given, or null if there is no such component interface.