writeEol(out);
int paramSize = method.getParams().size();
for (int i = 0; i < paramSize; i++)
{
MethodParam param = method.getParams().get(i);
writeIndent(out, indent);
out.write(" * @param " + param.getName() + " " + param.getType());
writeEol(out);
}
int exceptionSize = method.getExceptionType().size();
for (int i = 0; i < exceptionSize; i++)
{
String ex = method.getExceptionType().get(i);
writeIndent(out, indent);
out.write(" * @throws " + ex);
writeEol(out);
}
if (!method.getReturnType().equals("void"))
{
writeIndent(out, indent);
out.write(" * @return " + method.getReturnType());
writeEol(out);
}
writeIndent(out, indent);
out.write(" */");
writeEol(out);
writeIndent(out, indent);
out.write("public " + method.getReturnType() + " " +
method.getMethodName() + "(");
for (int i = 0; i < paramSize; i++)
{
MethodParam param = method.getParams().get(i);
out.write(param.getType());
out.write(" ");
out.write(param.getName());
if (i + 1 < paramSize)
out.write(", ");
}
out.write(")");
for (int i = 0; i < exceptionSize; i++)
{
if (i == 0)
out.write(" throws ");
String ex = method.getExceptionType().get(i);
out.write(ex);
if (i + 1 < exceptionSize)
out.write(", ");
}
writeLeftCurlyBracket(out, indent);
writeIndent(out, indent + 1);
if (!method.getReturnType().equals("void"))
{
out.write("return ");
}
out.write("mc." + method.getMethodName() + "(");
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(");");