View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   /* Generated By:JJTree: Do not edit this line. ASTTypeDeclaration.java */
5   
6   package net.sourceforge.pmd.lang.java.ast;
7   
8   import net.sourceforge.pmd.Rule;
9   
10  public class ASTTypeDeclaration extends AbstractJavaTypeNode implements CanSuppressWarnings {
11      public ASTTypeDeclaration(int id) {
12          super(id);
13      }
14  
15      public ASTTypeDeclaration(JavaParser p, int id) {
16          super(p, id);
17      }
18  
19  
20      public boolean hasSuppressWarningsAnnotationFor(Rule rule) {
21          for (int i = 0; i < jjtGetNumChildren(); i++) {
22              if (jjtGetChild(i) instanceof ASTAnnotation) {
23                  ASTAnnotation a = (ASTAnnotation) jjtGetChild(i);
24                  if (a.suppresses(rule)) {
25                      return true;
26                  }
27              }
28          }
29          return false;
30      }
31  
32      /**
33       * Accept the visitor. *
34       */
35      public Object jjtAccept(JavaParserVisitor visitor, Object data) {
36          return visitor.visit(this, data);
37      }
38  }