public String getNameFromPrimaryPrefix(ASTPrimaryPrefix pp) { if ((pp.jjtGetNumChildren() == 1) && (pp.jjtGetChild(0) instanceof ASTName)) { String name2 = ((ASTName) pp.jjtGetChild(0)).getImage(); return name2; } return null; }
private boolean ifVerify(ASTIfStatement is, String varname) { List finder = new ArrayList(); is.findChildrenOfType(ASTPrimaryExpression.class, finder, true); if (finder.size() > 1) { ASTPrimaryExpression apeLeft = (ASTPrimaryExpression) finder.get(0); if (matchName(apeLeft, varname)) { ASTPrimaryExpression apeRight = (ASTPrimaryExpression) finder.get(1); if ((apeRight.jjtGetNumChildren() == 1) && (apeRight.jjtGetChild(0) instanceof ASTPrimaryPrefix)) { ASTPrimaryPrefix pp2 = (ASTPrimaryPrefix) apeRight.jjtGetChild(0); if ((pp2.jjtGetNumChildren() == 1) && (pp2.jjtGetChild(0) instanceof ASTLiteral)) { ASTLiteral lit = (ASTLiteral) pp2.jjtGetChild(0); if ((lit.jjtGetNumChildren() == 1) && (lit.jjtGetChild(0) instanceof ASTNullLiteral)) { return true; } } } } } return false; }