@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {

      out.write("public class " + getClassName(def) + " implements Connection");
      writeLeftCurlyBracket(out, 0);
      int indent = 1;

      writeDefaultConstructor(def, out, indent);

      //constructor
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Default constructor\n");
      writeWithIndent(out, indent, " * @param connSpec ConnectionSpec\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "public " + getClassName(def) + "(ConnectionSpec connSpec)");
      writeLeftCurlyBracket(out, indent);
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeClose(def, out, indent);
      writeInteraction(def, out, indent);
      writeLocalTransaction(def, out, indent);
      writeMetaData(def, out, indent);
      writeResultSetInfo(def, out, indent);

      writeEol(out);
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Set ManagedConnection\n");
      writeWithIndent(out, indent, " */\n");
      writeWithIndent(out, indent,
            "void setManagedConnection(" + def.getMcfDefs().get(getNumOfMcf()).getMcClass() + " mc)");
      writeLeftCurlyBracket(out, indent);
      writeRightCurlyBracket(out, indent);

      writeRightCurlyBracket(out, 0);
   }
@ Override public void writeClassBody ( Definition def , Writer out ) throws IOException { out . write ( "public class " + getClassName ( def ) + " implements Connection" ) ; writeLeftCurlyBracket ( out , 0 ) ; int indent = 1 ; writeDefaultConstructor ( def , out , indent ) ; writeWithIndent ( out , indent , "/**\n" ) ; writeWithIndent ( out , indent , " * Default constructor\n" ) ; writeWithIndent ( out , indent , " * @param connSpec ConnectionSpec\n" ) ; writeWithIndent ( out , indent , " */\n" ) ; writeWithIndent ( out , indent , "public " + getClassName ( def ) + "(ConnectionSpec connSpec)" ) ; writeLeftCurlyBracket ( out , indent ) ; writeRightCurlyBracket ( out , indent ) ; writeEol ( out ) ; writeClose ( def , out , indent ) ; writeInteraction ( def , out , indent ) ; writeLocalTransaction ( def , out , indent ) ; writeMetaData ( def , out , indent ) ; writeResultSetInfo ( def , out , indent ) ; writeEol ( out ) ; writeWithIndent ( out , indent , "/**\n" ) ; writeWithIndent ( out , indent , " * Set ManagedConnection\n" ) ; writeWithIndent ( out , indent , " */\n" ) ; writeWithIndent ( out , indent , "void setManagedConnection(" + def . getMcfDefs ( ) . get ( getNumOfMcf ( ) ) . getMcClass ( ) + " mc)" ) ; writeLeftCurlyBracket ( out , indent ) ; writeRightCurlyBracket ( out , indent ) ; writeRightCurlyBracket ( out , 0 ) ; }
Output ResourceAdapater class

@param def definition
@param out Writer
@throws IOException ioException