I would like to test if a Specified Method exists. And I have done the programmation with some help from this website. Yeah, I have written 2 interfaces and a class who implement the interfaces.
Here are parts of the codes:
public class TestMethod extends AbstractNcssCountRule implements UpSearch,
JudgeResult {
public Object search(ASTMethodDeclaration node, Object data) {
return super.visit(node, data);
}
public Object judge(ASTMethodDeclaration node, Object data) {
if ((node.jjtGetChild(1) instanceof ASTMethodDeclarator && ( node
.jjtGetChild(1)).getImage().equals("isDirty"))) {
System.out.println("There it is.");
}
}
}
However,there is a small bug. When I move my cursor to the name of the class, it tells: Implicit super constructor AbstractNcssCountRule() is undefined for default constructor. Must define an explicit constructor