View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.plsql.dfa;
5   
6   import java.util.List;
7   
8   import net.sourceforge.pmd.lang.ast.Node;
9   import net.sourceforge.pmd.lang.dfa.AbstractDataFlowNode;
10  import net.sourceforge.pmd.lang.dfa.DataFlowNode;
11  import net.sourceforge.pmd.lang.plsql.ast.ASTProgramUnit;
12  import net.sourceforge.pmd.lang.plsql.ast.ASTTriggerUnit;
13  import net.sourceforge.pmd.lang.plsql.ast.ASTTypeMethod;
14  
15  public class PLSQLDataFlowNode extends AbstractDataFlowNode {
16  
17      public PLSQLDataFlowNode(List<DataFlowNode> dataFlow, Node node) {
18  	super(dataFlow, node);
19      }
20  
21      public String toString() {
22  	String res = "PLSQLDataFlowNode: line " + this.getLine() + ", (Type BitField==" + type + ")";
23  	if (node instanceof ASTProgramUnit || node instanceof ASTTypeMethod || node instanceof ASTTriggerUnit /* || node instanceof ASTConstructorDeclaration */) {
24  	    res += node instanceof ASTProgramUnit || node instanceof ASTTypeMethod ? "(method)" : "(trigger)";
25  	} else {
26  	    res += super.toString();
27  	}
28  	return res;
29      }
30  }