01 /* Generated By:JJTree: Do not edit this line. ASTTypeDeclaration.java */
02
03 package net.sourceforge.pmd.lang.java.ast;
04
05 import net.sourceforge.pmd.Rule;
06
07 public class ASTTypeDeclaration extends AbstractJavaTypeNode implements CanSuppressWarnings {
08 public ASTTypeDeclaration(int id) {
09 super(id);
10 }
11
12 public ASTTypeDeclaration(JavaParser p, int id) {
13 super(p, id);
14 }
15
16
17 public boolean hasSuppressWarningsAnnotationFor(Rule rule) {
18 for (int i = 0; i < jjtGetNumChildren(); i++) {
19 if (jjtGetChild(i) instanceof ASTAnnotation) {
20 ASTAnnotation a = (ASTAnnotation) jjtGetChild(i);
21 if (a.suppresses(rule)) {
22 return true;
23 }
24 }
25 }
26 return false;
27 }
28
29 /**
30 * Accept the visitor. *
31 */
32 public Object jjtAccept(JavaParserVisitor visitor, Object data) {
33 return visitor.visit(this, data);
34 }
35 }
|