void writeConfigProps ( Definition def , Writer out , int indent ) throws IOException { if ( getConfigProps ( def ) == null ) return ; for ( int i = 0 ; i < getConfigProps ( def ) . size ( ) ; i ++ ) { String name = getConfigProps ( def ) . get ( i ) . getName ( ) ; String upcaseName = upcaseFirst ( name ) ; //set writeWithIndent ( out , indent , "/** \n" ) ; writeWithIndent ( out , indent , " * Set " + name ) ; writeEol ( out ) ; writeWithIndent ( out , indent , " * @param " + name + " The value\n" ) ; writeWithIndent ( out , indent , " */\n" ) ; writeWithIndent ( out , indent , "public void set" + upcaseName + "(" + getConfigProps ( def ) . get ( i ) . getType ( ) + " " + name + ")" ) ; writeLeftCurlyBracket ( out , indent ) ; writeWithIndent ( out , indent + 1 , "this." + name + " = " + name + ";" ) ; writeRightCurlyBracket ( out , indent ) ; writeEol ( out ) ; //get writeWithIndent ( out , indent , "/** \n" ) ; writeWithIndent ( out , indent , " * Get " + name ) ; writeEol ( out ) ; writeWithIndent ( out , indent , " * @return The value\n" ) ; writeWithIndent ( out , indent , " */\n" ) ; writeWithIndent ( out , indent , "public " + getConfigProps ( def ) . get ( i ) . getType ( ) + " get" + upcaseName + "()" ) ; writeLeftCurlyBracket ( out , indent ) ; writeWithIndent ( out , indent + 1 , "return " + name + ";" ) ; writeRightCurlyBracket ( out , indent ) ; writeEol ( out ) ; } }
Output Configuration Properties