|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonathan.libs.kernel.JComponent
org.objectweb.jonathan.libs.kernel.decoders.LazyComponent
org.objectweb.jonathan.libs.kernel.decoders.JAssemblage
public class JAssemblage
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.
Field Summary | |
---|---|
protected int |
alternative
|
protected Component |
configuration
|
protected Element |
configuration_element
|
protected Component |
factory
|
protected Element |
factory_element
|
protected Element |
self
|
Fields inherited from class org.objectweb.jonathan.libs.kernel.decoders.LazyComponent |
---|
initialized |
Fields inherited from class org.objectweb.jonathan.libs.kernel.JComponent |
---|
int_value, reference, type, value |
Constructor Summary | |
---|---|
JAssemblage(Component _factory,
Component _configuration)
|
|
JAssemblage(Component _factory,
Component _configuration,
int _alt)
|
|
JAssemblage(Component _factory,
Component _configuration,
int _alt,
java.util.List _alternatives)
Creates a new assemblage whose alternatives are listed in _alternatives as JAlternatives. |
|
JAssemblage(Component _factory,
Component _configuration,
java.util.List _alternatives)
Creates a new assemblage whose alternatives are listed in _alternatives as JAlternatives. |
Method Summary | |
---|---|
Component |
duplicate()
|
Element |
getElement(Name _name)
Returns the element in the target component identified by name ,
null if no element exists under name name . |
java.lang.Object |
getFactoryValue()
Return a wrapper of this JComponent value for factory aspects. |
java.lang.Object |
getInstance()
From Instanciable interface. |
protected void |
initialize()
JAssemblage specific initialization code. |
void |
initialize(java.lang.Object _obj,
Context _c,
int _alternative)
Implementation of the Initializer interface's initialize method. |
boolean |
isInstanciated()
From Instanciable interface. |
java.lang.Object |
newObject(Context _c,
int _alternative,
Instanciable _instance)
Implementation of the MultiFactory interface's newObject method. |
java.lang.String |
toString()
|
Methods inherited from class org.objectweb.jonathan.libs.kernel.decoders.LazyComponent |
---|
getIntValue, getType, getValue |
Methods inherited from class org.objectweb.jonathan.libs.kernel.JComponent |
---|
fork, getComponent, getReference, getValue, internalFork, reset, setReference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Component factory
protected Component configuration
protected Element factory_element
protected Element configuration_element
protected Element self
protected int alternative
Constructor Detail |
---|
public JAssemblage(Component _factory, Component _configuration, java.util.List _alternatives)
public JAssemblage(Component _factory, Component _configuration, int _alt, java.util.List _alternatives)
public JAssemblage(Component _factory, Component _configuration)
public JAssemblage(Component _factory, Component _configuration, int _alt)
Method Detail |
---|
public Component duplicate()
duplicate
in class JComponent
public Element getElement(Name _name)
Component
name
,
null if no element exists under name name
.
getElement
in interface Component
getElement
in class JComponent
_name
- the name of the element to be retrieved;
public java.lang.String toString()
toString
in class JComponent
public java.lang.Object getFactoryValue() throws JonathanException
getFactoryValue
in interface Component
getFactoryValue
in class JComponent
JonathanException
public java.lang.Object newObject(Context _c, int _alternative, Instanciable _instance) throws JonathanException
_alternative
.
newObject
in interface MultiFactory
_c
- where the instanciation parameters are found_alternative
- the alternative to instantiate_instance
- the method's caller.
_alternative
's instance
JonathanException
- if something goes wrong.public void initialize(java.lang.Object _obj, Context _c, int _alternative) throws JonathanException
_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.protected final void initialize()
LazyComponent
.
initialize
in class LazyComponent
public boolean isInstanciated()
isInstanciated
in interface Instanciable
public java.lang.Object getInstance()
getInstance
in interface Instanciable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |