View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   
5   /* Generated By:JJTree: Do not edit this line. ASTPrimarySuffix.java Version 4.1 */
6   /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY= */
7   package net.sourceforge.pmd.lang.plsql.ast;
8   
9   public class ASTPrimarySuffix extends net.sourceforge.pmd.lang.plsql.ast.AbstractPLSQLNode{
10    public ASTPrimarySuffix(int id) {
11      super(id);
12    }
13  
14    public ASTPrimarySuffix(PLSQLParser p, int id) {
15      super(p, id);
16    }
17  
18  
19    /** Accept the visitor. **/
20    public Object jjtAccept(PLSQLParserVisitor visitor, Object data) {
21      return visitor.visit(this, data);
22    }
23  
24    private boolean isArguments;
25    private boolean isArrayDereference;
26  
27    public void setIsArrayDereference() {
28        isArrayDereference = true;
29    }
30  
31    public boolean isArrayDereference() {
32        return isArrayDereference;
33    }
34  
35    public void setIsArguments() {
36        this.isArguments = true;
37    }
38  
39    public boolean isArguments() {
40        return this.isArguments;
41    }
42  
43    /**
44     * Get the number of arguments for this primary suffix.  One should call
45     * {@link #isArguments()} to see if there are arguments.  If this method is
46     * called when there are no arguments it returns <code>-1</code>.
47     * @return A non-negative argument number when there are arguments,
48     * <code>-1</code> otherwise.
49     */
50    public int getArgumentCount() {
51        if (!this.isArguments()) {
52  	  return -1;
53        }
54        return ((ASTArguments)jjtGetChild(jjtGetNumChildren()-1)).getArgumentCount();
55    }
56  }
57  /* JavaCC - OriginalChecksum=5b2263901be5de081a66c8930ce58545 (do not edit this line) */