astvariabledeclaratorid.java
来自「检查Java程序漏洞」· Java 代码 · 共 51 行
JAVA
51 行
/* Generated By:JJTree: Do not edit this line. ASTVariableDeclaratorId.java */package net.sourceforge.pmd.ast;public class ASTVariableDeclaratorId extends SimpleNode { public ASTVariableDeclaratorId(int id) { super(id); } public ASTVariableDeclaratorId(JavaParser p, int id) { super(p, id); } /** Accept the visitor. **/ public Object jjtAccept(JavaParserVisitor visitor, Object data) { return visitor.visit(this, data); } public boolean isExceptionBlockParameter() { return jjtGetParent().jjtGetParent() instanceof ASTTryStatement; } public SimpleNode getTypeNameNode() { if (jjtGetParent() instanceof ASTFormalParameter) { return findTypeNameNode(jjtGetParent()); } else if (jjtGetParent().jjtGetParent() instanceof ASTLocalVariableDeclaration || jjtGetParent().jjtGetParent() instanceof ASTFieldDeclaration) { return findTypeNameNode(jjtGetParent().jjtGetParent()); } throw new RuntimeException("Don't know how to get the type for anything other than ASTLocalVariableDeclaration/ASTFormalParameter/ASTFieldDeclaration"); } public ASTType getTypeNode() { if (jjtGetParent() instanceof ASTFormalParameter) { return (ASTType)jjtGetParent().jjtGetChild(0); } else if (jjtGetParent().jjtGetParent() instanceof ASTLocalVariableDeclaration || jjtGetParent().jjtGetParent() instanceof ASTFieldDeclaration) { return (ASTType)(jjtGetParent().jjtGetParent().jjtGetChild(0)); } throw new RuntimeException("Don't know how to get the type for anything other than ASTLocalVariableDeclaration/ASTFormalParameter/ASTFieldDeclaration"); } public void dump(String prefix) { System.out.println(toString(prefix) + ":" + getImage()); dumpChildren(prefix); } private SimpleNode findTypeNameNode(Node node) { ASTType typeNode = (ASTType) node.jjtGetChild(0); return (SimpleNode) typeNode.jjtGetChild(0); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?