Methods Summary |
---|
public com.sun.corba.se.spi.orb.PropertyParser | add(java.lang.String propName, Operation action, java.lang.String fieldName)
actions.add( ParserActionFactory.makeNormalAction( propName,
action, fieldName ) ) ;
return this ;
|
public com.sun.corba.se.spi.orb.PropertyParser | addPrefix(java.lang.String propName, Operation action, java.lang.String fieldName, java.lang.Class componentType)
actions.add( ParserActionFactory.makePrefixAction( propName,
action, fieldName, componentType ) ) ;
return this ;
|
public java.util.Iterator | iterator()
return actions.iterator() ;
|
public java.util.Map | parse(java.util.Properties props)Return a map from field name to value.
Map map = new HashMap() ;
Iterator iter = actions.iterator() ;
while (iter.hasNext()) {
ParserAction act = (ParserAction)(iter.next()) ;
Object result = act.apply( props ) ;
// A null result means that the property was not set for
// this action, so do not override the default value in this case.
if (result != null)
map.put( act.getFieldName(), result ) ;
}
return map ;
|