public void printIt ( Record recLayout , PrintWriter out , int iIndents , String strEnd ) { // Print out the current record String strName = recLayout . getField ( Layout . NAME ) . toString ( ) ; String strType = recLayout . getField ( Layout . TYPE ) . toString ( ) ; String strValue = recLayout . getField ( Layout . FIELD_VALUE ) . toString ( ) ; String strReturns = recLayout . getField ( Layout . RETURNS_VALUE ) . toString ( ) ; String strMax = recLayout . getField ( Layout . MAXIMUM ) . toString ( ) ; String strDescription = recLayout . getField ( Layout . COMMENT ) . toString ( ) ; boolean bLoop = false ; if ( ( strType . equalsIgnoreCase ( "module" ) ) || ( strType . equalsIgnoreCase ( "enum" ) ) || ( strType . equalsIgnoreCase ( "struct" ) ) || ( strType . equalsIgnoreCase ( "interface" ) ) ) bLoop = true ; if ( bLoop ) { this . println ( out , strType + " " + strName , strDescription , iIndents , "" ) ; String strEndLoop = ";" ; if ( strType . equalsIgnoreCase ( "enum" ) ) strEndLoop = null ; this . println ( out , "{" , null , iIndents , "" ) ; Layout recLayoutLoop = new Layout ( recLayout . findRecordOwner ( ) ) ; recLayoutLoop . setKeyArea ( Layout . PARENT_FOLDER_ID_KEY ) ; recLayoutLoop . addListener ( new SubFileFilter ( recLayout ) ) ; try { boolean bFirstLoop = true ; while ( recLayoutLoop . hasNext ( ) ) { if ( strEndLoop == null ) if ( ! bFirstLoop ) this . println ( out , "," , null , 0 , "" ) ; recLayoutLoop . next ( ) ; this . printIt ( recLayoutLoop , out , iIndents + 1 , strEndLoop ) ; bFirstLoop = false ; } if ( strEndLoop == null ) if ( ! bFirstLoop ) this . println ( out , "" , null , 0 , "" ) ; // Carriage return recLayoutLoop . free ( ) ; recLayoutLoop = null ; } catch ( DBException ex ) { ex . printStackTrace ( ) ; } this . println ( out , "}" , null , iIndents , strEnd ) ; } else { if ( strType . equalsIgnoreCase ( "collection" ) ) strType = "typedef sequence<" + strValue + ">" ; else if ( strType . equalsIgnoreCase ( "method" ) ) { strType = strReturns + " " ; strName += "(" + strValue + ")" ; } else if ( strType . equalsIgnoreCase ( "comment" ) ) strType = "//\t" + strType ; else if ( strValue . length ( ) > 0 ) strName += " = " + strValue ; this . println ( out , strType + " " + strName , strDescription , iIndents , strEnd ) ; } }
PrintIt Method .