|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IInit
With the posibility of be initiated.
This interface is thought to be used with Factory.
Although it can be used in others situations, where you
create a object of unknow class y you need initiate it.
A possible example of use:
IInit obj = (IInit) myClass.newInstance();
obj.init("obj");
The object that implements this interface generally
have a default constructor, and you initiate the object
with init(java.lang.String).
| Method Summary | |
|---|---|
void |
init(java.lang.String name)
Initiate the object. |
| Method Detail |
|---|
void init(java.lang.String name)
throws InitException
The init process must to be in this metho, and not in
constructor.
It possible to specefy a name, thus you can have
different configurations in the same object type.
This name can be used to read a properties file, with
if/else or another technique.
name - Identifier name used on init. Can be null.
InitException - Some problem on initiate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||