|
||||||||||
| 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.JImplicitFactory
Runtime implicit factory component. Provides the basic behaviour of a
MultiFactory: holds a set of implementation alternatives
(given at the object's creation) and instantiates one of them, according
to a given chosen alternative ID.
| Field Summary |
| Fields inherited from class org.objectweb.jonathan.libs.kernel.JComponent |
int_value, reference, type, value |
| Constructor Summary | |
JImplicitFactory(java.util.List _alternatives)
Creates a new implicit factory whose implementation alternatives are listed in _alternatives as JAlternatives. |
|
| Method Summary | |
Component |
duplicate()
Creates a new implicit factory holding the same implementation alternatives. |
void |
initialize(java.lang.Object _obj,
Context _c,
int _alternative)
Implementation of the Initializer interface's initialize method. |
java.lang.Object |
newObject(Context _c)
From Factory interface. |
java.lang.Object |
newObject(Context _c,
int _alternative,
Instanciable _instance)
Returns a new instance of the implicit factory's implementation alternative whose ID is _alternative. |
java.lang.String |
toString()
|
| Methods inherited from class org.objectweb.jonathan.libs.kernel.JComponent |
fork, getComponent, getElement, getFactoryValue, getIntValue, getReference, getType, getValue, getValue, internalFork, reset, setReference |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JImplicitFactory(java.util.List _alternatives)
| Method Detail |
public Component duplicate()
duplicate in class JComponent
public java.lang.Object newObject(Context _c)
throws JonathanException
_c is the local Context
containing the required instanciation parameters.
newObject in interface Factory_c - contains the instanciation parameter
JonathanException - if something goes wrong.
public java.lang.Object newObject(Context _c,
int _alternative,
Instanciable _instance)
throws JonathanException
_alternative. In the single implementation
alternative case, it works only if the single alternative's ID is the
given one (although newObject(Context) would do it anyway).
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. In the single implementation
alternative case, it works only if the single alternative's ID is the
given one (although initialize(Object,Context) would do it
anyway).
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.public java.lang.String toString()
toString in class JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||