public static ASTNode getASTNode(CompilationUnit compilationUnit, int startLine, int endLine) throws ASTNodeNotFoundException {
checkForNull(compilationUnit, "compilation unit");
ASTNode node = searchASTNode(compilationUnit, startLine, endLine);
if (node == null) {
throw new ASTNodeNotFoundException("No ast node found between " + startLine + " and " + endLine + ".");
}
return node;
}