use of org.eclipse.jdt.core.dom.TypeDeclaration in project eclipse-pmd by acanda.
the class SuppressWarningsQuickFix method findBodyDeclaration.
private BodyDeclaration findBodyDeclaration(final ASTNode node) {
final BodyDeclaration[] bodyDeclaration = new BodyDeclaration[1];
node.accept(new ASTVisitor() {
@Override
public boolean visit(final EnumDeclaration node) {
bodyDeclaration[0] = node;
return false;
}
@Override
public boolean visit(final TypeDeclaration node) {
bodyDeclaration[0] = node;
return false;
}
@Override
public boolean visit(final AnnotationTypeDeclaration node) {
bodyDeclaration[0] = node;
return false;
}
});
return bodyDeclaration[0];
}
Aggregations