org.objectweb.jonathan.libs.kernel.decoders
Class JAssemblage
- Component, Forkable, Initializer, Instanciable, MultiFactory
Runtime assemblage component. Initialisation issues
are dealt with by the
LazyComponent
implementation.
Provides the basic behaviour of a
MultiFactory
too: holds a set of implementation alternatives.
duplicate , fork , getComponent , getElement , getFactoryValue , getIntValue , getReference , getType , getValue , getValue , internalFork , reset , setReference , toString |
alternative
protected int alternative
configuration
protected Component configuration
configuration_element
protected Element configuration_element
factory_element
protected Element factory_element
JAssemblage
public JAssemblage(Component _factory,
Component _configuration,
List _alternatives)
Creates a new assemblage whose alternatives
are listed in _alternatives as JAlternatives.
JAssemblage
public JAssemblage(Component _factory,
Component _configuration,
int _alt,
List _alternatives)
Creates a new assemblage whose alternatives
are listed in _alternatives as JAlternatives.
getElement
public Element getElement(Name _name)
Returns the element in the target component identified by name
,
null if no element exists under name name
.
- getElement in interface Component
- getElement in interface JComponent
- the corresponding element, if any; null otherwise.
getInstance
public Object getInstance()
From Instanciable interface.
- getInstance in interface Instanciable
- the value of the component (without computing it!).
initialize
protected final void initialize()
JAssemblage specific initialization code. Seeks & instantiates
its factory, and then asks its factory to instantiate the
assemblage's own value. Used internally by
LazyComponent
.
- initialize in interface LazyComponent
initialize
public void initialize(Object _obj,
Context _c,
int _alternative)
throws JonathanException
Implementation of the Initializer interface's initialize method.
Initializes an instance of the atom's implementation
alternative whose ID is _alternative
by calling its
setters.
- initialize in interface Initializer
_obj
- the object to initialize_c
- where the initialisation parameters are found_alternative
- the alternative to instantiate
JonathanException
- if something goes wrong.
isInstanciated
public boolean isInstanciated()
From Instanciable interface.
- isInstanciated in interface Instanciable
- true if the value exists, false otherwise.
newObject
public Object newObject(Context _c,
int _alternative,
Instanciable _instance)
throws JonathanException
Implementation of the MultiFactory interface's newObject method.
Returns a new instance of the atom's implementation
alternative whose ID is _alternative
.
- newObject in interface MultiFactory
_c
- where the instanciation parameters are found_alternative
- the alternative to instantiate_instance
- the method's caller.
- an new
_alternative
's instance
JonathanException
- if something goes wrong.
toString
public String toString()
- toString in interface JComponent