code: private void writeMethods(Definition def, Writer out, int indent) throws IOException
     {
        if (def.getMcfDefs().get(0).isDefineMethodInConnection())
        {
           if (def.getMcfDefs().get(0).getMethods().size() > 0)
           {
              for (MethodForConnection method : def.getMcfDefs().get(0).getMethods())
              {
                 writeMethodSignature(out, indent, method);
  
                 writeLeftCurlyBracket(out, indent);
                 writeIndent(out, indent + 1);
                 if (!method.getReturnType().equals("void"))
                 {
                    out.write("return ");
                 }
                 out.write("getConnection()." + method.getMethodName() + "(");
                 int paramSize = method.getParams().size();
                 for (int i = 0; i < paramSize; i++)
                 {
                    MethodParam param = method.getParams().get(i);
                    out.write(param.getName());
                    if (i + 1 < paramSize)
                       out.write(", ");
                 }
                 out.write(");\n");
  
                 writeRightCurlyBracket(out, indent);
              }
           }
        }
        else
        {
           writeSimpleMethodSignature(out, indent, " * Call me", "public void callMe()");
           writeLeftCurlyBracket(out, indent);
           writeWithIndent(out, indent + 1, "try");
           writeLeftCurlyBracket(out, indent + 1);
           writeWithIndent(out, indent + 2, "getConnection().callMe();");
           writeRightCurlyBracket(out, indent + 1);
           writeWithIndent(out, indent + 1, "catch (Exception e)");
           writeLeftCurlyBracket(out, indent + 1);
           writeRightCurlyBracket(out, indent + 1);
           writeRightCurlyBracket(out, indent);
        }
     }
docs: Output defined methods
  
  @param def    definition
  @param out    Writer
  @param indent space number
  @throws IOException ioException