|
PTLog API - 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jp.ne.dti.lares.foozy.ptlog.glue.PropertiesCompositionConfig
Configuration utility with Properties
class.
This help to build composite Object
up
from java.util.Properties
.
Object creation is done in steps shown below.
aliasKeyPrefix
delimiter
into two parts
Class.forName()
with second half
Class.newInstance()
componentKeyPrefix
String#compareTo
)
delimiter
into two parts
empty string
, if property value does not contain
delimiter
in it)
as parameter for factory,
allowFailure
is true,
then, this throws IllegalArgumentException
addComponent(java.lang.Object, java.lang.Object, java.lang.String)
to create component object
and add it to container
container
You must concretize below method(s) to have this function.
Constructor Summary | |
PropertiesCompositionConfig(java.lang.String aliasKeyPrefix,
java.lang.String componentKeyPrefix,
char delimiter,
boolean allowFailure)
Constructor. |
Method Summary | |
protected abstract void |
addComponent(java.lang.Object containerObject,
java.lang.Object factoryObject,
java.lang.String parameter)
|
protected java.lang.Object |
create_(java.lang.Object container,
java.io.InputStream stream)
Create Object from specified stream.
|
protected java.lang.Object |
create_(java.lang.Object container,
java.util.Properties properties)
Create Object from specified properties.
|
protected java.lang.Object |
create_(java.lang.Object container,
java.lang.String filename)
Create Object from specified file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PropertiesCompositionConfig(java.lang.String aliasKeyPrefix, java.lang.String componentKeyPrefix, char delimiter, boolean allowFailure)
Method Detail |
protected final java.lang.Object create_(java.lang.Object container, java.util.Properties properties)
Object
from specified properties.
See class description
about behavior of this method.
container
- of componentsproperties
- containing component configurationprotected final java.lang.Object create_(java.lang.Object container, java.io.InputStream stream) throws java.io.IOException
Object
from specified stream.
ATTENTION:Stream closing is not responsibility of this class but of caller side.
container
- of componentsstream
- to load data into properties.
java.io.IOException
protected final java.lang.Object create_(java.lang.Object container, java.lang.String filename) throws java.io.IOException
Object
from specified file.
container
- of componentsfilename
- to load data into properties.
java.io.IOException
protected abstract void addComponent(java.lang.Object containerObject, java.lang.Object factoryObject, java.lang.String parameter)
|
PTLog API - 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |