Package org.openxava.util
Interface IInit
-
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 withinit(java.lang.String)
.- Author:
- Javier Paniza
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
init(java.lang.String name)
Initiate the object.
-
-
-
Method Detail
-
init
void init(java.lang.String name) throws InitException
Initiate the object.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.- Parameters:
name
- Identifier name used on init. Can be null.- Throws:
InitException
- Some problem on initiate.
-
-