public class JAtom extends LazyComponent implements MultiFactory, Initializer
LazyComponent
implementation.
Provides the basic behaviour of a
MultiFactory
too: holds a set of implementation alternatives.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
classe |
initialized
int_value, reference, type, value
Constructor and Description |
---|
JAtom(java.lang.String _class)
Creates a new class atom whose alternatives
are listed in _alternatives as JAlternatives.
|
JAtom(java.lang.String _class,
java.util.List _alternatives)
Creates a new class atom whose alternatives
are listed in _alternatives as JAlternatives.
|
Modifier and Type | Method and Description |
---|---|
Component |
duplicate() |
java.lang.Object |
getFactoryValue()
Return a wrapper of this JComponent value for factory aspects.
|
protected void |
initialize()
JAtom specific initialization code.
|
void |
initialize(java.lang.Object _obj,
Context _c,
int _alternative)
Implementation of the Initializer interface's initialize method.
|
java.lang.Object |
newObject(Context _c,
int _alternative,
Instanciable _instance)
Implementation of the MultiFactory interface's newObject method.
|
java.lang.String |
toString() |
getIntValue, getType, getValue
fork, getComponent, getElement, getReference, getValue, internalFork, reset, setReference
public JAtom(java.lang.String _class, java.util.List _alternatives)
public JAtom(java.lang.String _class)
public Component duplicate()
duplicate
in class JComponent
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 instanceJonathanException
- 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 instantiateJonathanException
- if something goes wrong.protected final void initialize()
LazyComponent
.initialize
in class LazyComponent