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. ASTResource.java Version 4.1 */
5   /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY= */
6   package net.sourceforge.pmd.lang.java.ast;
7   
8   import net.sourceforge.pmd.lang.ast.Node;
9   
10  public class ASTResource extends ASTFormalParameter {
11    public ASTResource(int id) {
12      super(id);
13    }
14  
15    public ASTResource(JavaParser p, int id) {
16      super(p, id);
17    }
18  
19  
20    /** Accept the visitor. **/
21    public Object jjtAccept(JavaParserVisitor visitor, Object data) {
22      return visitor.visit(this, data);
23    }
24  
25      @Override
26      protected ASTVariableDeclaratorId getDecl() {
27          for (int i = 0; i < jjtGetNumChildren(); i++) {
28              Node n = jjtGetChild(i);
29              if (n instanceof ASTVariableDeclaratorId) {
30                  return (ASTVariableDeclaratorId)n;
31              }
32          }
33          return null;
34      }
35  }
36  /* JavaCC - OriginalChecksum=92734fc70bba91fd9422150dbf87d5c4 (do not edit this line) */