📄 javaparser.java
字号:
} } } final public void MethodDeclarator() throws ParseException { /*@bgen(jjtree) MethodDeclarator */ ASTMethodDeclarator jjtn000 = new ASTMethodDeclarator(this, JJTMETHODDECLARATOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t = null; try { t = jj_consume_token(IDENTIFIER); checkForBadAssertUsage(t.image, "a method name"); checkForBadEnumUsage(t.image, "a method name"); jjtn000.setImage( t.image ); FormalParameters(); label_17: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[40] = jj_gen; break label_17; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void FormalParameters() throws ParseException { /*@bgen(jjtree) FormalParameters */ ASTFormalParameters jjtn000 = new ASTFormalParameters(this, JJTFORMALPARAMETERS); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: FormalParameter(); label_18: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[41] = jj_gen; break label_18; } jj_consume_token(COMMA); FormalParameter(); } break; default: jj_la1[42] = jj_gen; ; } jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void FormalParameter() throws ParseException { /*@bgen(jjtree) FormalParameter */ ASTFormalParameter jjtn000 = new ASTFormalParameter(this, JJTFORMALPARAMETER); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINAL: jj_consume_token(FINAL); jjtn000.setFinal(); break; default: jj_la1[43] = jj_gen; ; } Type(); VariableDeclaratorId(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void ConstructorDeclaration() throws ParseException { /*@bgen(jjtree) ConstructorDeclaration */ ASTConstructorDeclaration jjtn000 = new ASTConstructorDeclaration(this, JJTCONSTRUCTORDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PRIVATE: case PROTECTED: case PUBLIC: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); jjtn000.setPublic(); break; case PROTECTED: jj_consume_token(PROTECTED); jjtn000.setProtected(); break; case PRIVATE: jj_consume_token(PRIVATE); jjtn000.setPrivate(); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[45] = jj_gen; ; } jj_consume_token(IDENTIFIER); FormalParameters(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: jj_la1[46] = jj_gen; ; } jj_consume_token(LBRACE); if (jj_2_13(2147483647)) { ExplicitConstructorInvocation(); } else { ; } label_19: while (true) { if (jj_2_14(1)) { ; } else { break label_19; } BlockStatement(); } jj_consume_token(RBRACE); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void ExplicitConstructorInvocation() throws ParseException { /*@bgen(jjtree) ExplicitConstructorInvocation */ ASTExplicitConstructorInvocation jjtn000 = new ASTExplicitConstructorInvocation(this, JJTEXPLICITCONSTRUCTORINVOCATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { if (jj_2_16(2147483647)) { jj_consume_token(THIS); ((ASTExplicitConstructorInvocation)jjtn000).setIsThis(); Arguments(); jj_consume_token(SEMICOLON); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: if (jj_2_15(2)) { PrimaryExpression(); jj_consume_token(DOT); } else { ; } jj_consume_token(SUPER); ((ASTExplicitConstructorInvocation)jjtn000).setIsSuper(); Arguments(); jj_consume_token(SEMICOLON); break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Initializer() throws ParseException { /*@bgen(jjtree) Initializer */ ASTInitializer jjtn000 = new ASTInitializer(this, JJTINITIALIZER); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); jjtn000.setStatic(); break; default: jj_la1[48] = jj_gen; ; } Block(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }/* * Type, name and expression syntax follows. */ final public void Type() throws ParseException { /*@bgen(jjtree) Type */ ASTType jjtn000 = new ASTType(this, JJTTYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); break; case IDENTIFIER: Name(); break; default: jj_la1[49] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_20: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[50] = jj_gen; break label_20; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); jjtn000.addDimension(); jjtn000.setIsArray(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void PrimitiveType() throws ParseException { /*@bgen(jjtree) PrimitiveType */ ASTPrimitiveType jjtn000 = new ASTPrimitiveType(this, JJTPRIMITIVETYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: jj_consume_token(BOOLEAN); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("boolean"); break; case CHAR: jj_consume_token(CHAR); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("char"); break; case BYTE: jj_consume_token(BYTE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("byte"); break; case SHORT: jj_consume_token(SHORT); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("short"); break; case INT: jj_consume_token(INT); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("int"); break; case LONG: jj_consume_token(LONG); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("long"); break; case FLOAT: jj_consume_token(FLOAT); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("float"); break; case DOUBLE: jj_consume_token(DOUBLE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage("double"); break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void ResultType() throws ParseException { /*@bgen(jjtree) ResultType */ ASTResultType jjtn000 = new ASTResultType(this, JJTRESULTTYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VOID: jj_consume_token(VOID); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: Type(); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -