FileDocCategorySizeDatePackage
PropertyParser.javaAPI DocJava SE 5 API1667Fri Aug 26 14:54:38 BST 2005com.sun.corba.se.spi.orb

PropertyParser

public class PropertyParser extends Object

Fields Summary
private List
actions
Constructors Summary
public PropertyParser()

	actions = new LinkedList() ;
    
Methods Summary
public com.sun.corba.se.spi.orb.PropertyParseradd(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.PropertyParseraddPrefix(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.Iteratoriterator()

	return actions.iterator() ;
    
public java.util.Mapparse(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 ;