01: /* Generated By:JJTree: Do not edit this line. ASTBlockStatement.java */
02:
03: package net.sourceforge.pmd.ast;
04:
05: public class ASTBlockStatement extends SimpleJavaNode {
06: public ASTBlockStatement(int id) {
07: super (id);
08: }
09:
10: public ASTBlockStatement(JavaParser p, int id) {
11: super (p, id);
12: }
13:
14: /**
15: * Accept the visitor. *
16: */
17: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
18: return visitor.visit(this , data);
19: }
20:
21: /**
22: * Tells if this BlockStatement is an allocation statement.
23: * This is done by
24: *
25: * @return the result of !findChildrenOfType(ASTAllocationExpression.class).isEmpty()
26: */
27: public final boolean isAllocation() {
28: return !findChildrenOfType(ASTAllocationExpression.class)
29: .isEmpty();
30: }
31: }
|