public void visit(MethodDeclaration n, Object arg) {
if ("".equals(getSearchMethodName())) {
if (n.getBody() == null) {
printer.print(";");
} else {
BlockStmt bm = n.getBody();
List<Statement> smList = bm.getStmts();
for (Statement sm : smList) {
printer.printLn(sm.toString());
}
n.getBody().accept(this, arg);
}
} else {
if (n.getName().equals(getSearchMethodName())) {
if (n.getBody() == null) {
printer.print(";");
} else {
BlockStmt bm = n.getBody();
List<Statement> smList = bm.getStmts();
for (Statement sm : smList) {
printer.printLn(sm.toString());
}
n.getBody().accept(this, arg);
}