public void forAllValuePairs ( String template , Properties attributes ) throws XDocletException { String name = attributes . getProperty ( ATTRIBUTE_NAME , "attributes" ) ; String defaultValue = attributes . getProperty ( ATTRIBUTE_DEFAULT_RIGHT , "" ) ; String attributePairs = getPropertyValue ( attributes . getProperty ( ATTRIBUTE_LEVEL ) , name ) ; if ( ( attributePairs == null ) || ( attributePairs . length ( ) == 0 ) ) { return ; } String token ; int pos ; for ( CommaListIterator it = new CommaListIterator ( attributePairs ) ; it . hasNext ( ) ; ) { token = it . getNext ( ) ; pos = token . indexOf ( ' ' ) ; if ( pos >= 0 ) { _curPairLeft = token . substring ( 0 , pos ) ; _curPairRight = ( pos < token . length ( ) - 1 ? token . substring ( pos + 1 ) : defaultValue ) ; } else { _curPairLeft = token ; _curPairRight = defaultValue ; } if ( _curPairLeft . length ( ) > 0 ) { generate ( template ) ; } } _curPairLeft = null ; _curPairRight = null ; }
Processes the template for the comma - separated value pairs in an attribute of the current object on the specified level .