out.write("NoArg");
else
{
for (int i = 0; i < paramSize; i++)
{
MethodParam param = method.getParams().get(i);
out.write(upcaseFirst(param.getName()));
String type = param.getType();
if (type.indexOf(".") >= 0)
type = type.substring(type.lastIndexOf(".") + 1);
out.write(type);
}
}
out.write("() throws Throwable");
writeLeftCurlyBracket(out, indent);
writeIndent(out, indent + 1);
out.write("assertNotNull(connectionFactory" + num + ");");
writeEol(out);
writeIndent(out, indent + 1);
if (def.getMcfDefs().get(num - 1).isUseCciConnection())
out.write("javax.resource.cci.Connection");
else
out.write(def.getMcfDefs().get(num - 1).getConnInterfaceClass());
out.write(" connection" + num + " = connectionFactory" + num + ".getConnection();");
writeEol(out);
writeIndent(out, indent + 1);
out.write("assertNotNull(connection" + num + ");");
writeEol(out);
writeIndent(out, indent + 1);
if (!method.getReturnType().equals("void"))
{
out.write(method.getReturnType() + " result = ");
}
out.write("connection" + num + "." + method.getMethodName() + "(");
for (int i = 0; i < paramSize; i++)
{
MethodParam param = method.getParams().get(i);
out.write(BasicType.defaultValue(param.getType()));
if (i + 1 < paramSize)
out.write(", ");
}
out.write(");");
writeEol(out);