org.objectweb.fractal.util
Class Fractal

java.lang.Object
  extended by org.objectweb.fractal.util.Fractal

public class Fractal
extends java.lang.Object

Provides static methods to access standard interfaces of Fractal components.


Method Summary
static AttributeController getAttributeController(Component component)
          Returns the AttributeController interface of the given component.
static BindingController getBindingController(Component component)
          Returns the BindingController interface of the given component.
static Component getBootstrapComponent()
          Returns a bootstrap component to create other components.
static Component getBootstrapComponent(java.util.Map hints)
          Returns a bootstrap component to create other components.
static ContentController getContentController(Component component)
          Returns the ContentController interface of the given component.
static Factory getFactory(Component component)
          Returns the Factory interface of the given component.
static GenericFactory getGenericFactory(Component component)
          Returns the GenericFactory interface of the given component.
static LifeCycleController getLifeCycleController(Component component)
          Returns the LifeCycleController interface of the given component.
static NameController getNameController(Component component)
          Returns the NameController interface of the given component.
static SuperController getSuperController(Component component)
          Returns the SuperController interface of the given component.
static TypeFactory getTypeFactory(Component component)
          Returns the TypeFactory interface of the given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBootstrapComponent

public static Component getBootstrapComponent()
                                       throws InstantiationException
Returns a bootstrap component to create other components. This method just calls the corresponding method of the org.objectweb.fractal.api.Fractal class.

Returns:
a bootstrap component to create other components.
Throws:
InstantiationException - if the bootstrap component cannot be created.

getBootstrapComponent

public static Component getBootstrapComponent(java.util.Map hints)
                                       throws InstantiationException
Returns a bootstrap component to create other components. This method creates an instance of the class whose name is associated to the "fractal.provider" key, which must implement the Factory or GenericFactory interface, and returns the component instantiated by this factory.

Parameters:
hints - a map which must associate a value to the "fractal.provider" key, and which may associate a ClassLoader to the "classloader" key. This class loader will be used to load the bootstrap component.
Returns:
a bootstrap component to create other components.
Throws:
InstantiationException - if the bootstrap component cannot be created.

getAttributeController

public static AttributeController getAttributeController(Component component)
                                                  throws NoSuchInterfaceException
Returns the AttributeController interface of the given component.

Parameters:
component - a component.
Returns:
the AttributeController interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getBindingController

public static BindingController getBindingController(Component component)
                                              throws NoSuchInterfaceException
Returns the BindingController interface of the given component.

Parameters:
component - a component.
Returns:
the BindingController interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getContentController

public static ContentController getContentController(Component component)
                                              throws NoSuchInterfaceException
Returns the ContentController interface of the given component.

Parameters:
component - a component.
Returns:
the ContentController interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getSuperController

public static SuperController getSuperController(Component component)
                                          throws NoSuchInterfaceException
Returns the SuperController interface of the given component.

Parameters:
component - a component.
Returns:
the SuperController interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getNameController

public static NameController getNameController(Component component)
                                        throws NoSuchInterfaceException
Returns the NameController interface of the given component.

Parameters:
component - a component.
Returns:
the NameController interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getLifeCycleController

public static LifeCycleController getLifeCycleController(Component component)
                                                  throws NoSuchInterfaceException
Returns the LifeCycleController interface of the given component.

Parameters:
component - a component.
Returns:
the LifeCycleController interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getFactory

public static Factory getFactory(Component component)
                          throws NoSuchInterfaceException
Returns the Factory interface of the given component.

Parameters:
component - a component.
Returns:
the Factory interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getGenericFactory

public static GenericFactory getGenericFactory(Component component)
                                        throws NoSuchInterfaceException
Returns the GenericFactory interface of the given component.

Parameters:
component - a component.
Returns:
the GenericFactory interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.

getTypeFactory

public static TypeFactory getTypeFactory(Component component)
                                  throws NoSuchInterfaceException
Returns the TypeFactory interface of the given component.

Parameters:
component - a component.
Returns:
the TypeFactory interface of the given component.
Throws:
NoSuchInterfaceException - if there is no such interface.


Copyright © 2007-2011. All Rights Reserved.