The default implementation does nothing.
+ */ + @Override public void enterSourceFile(GoParser.SourceFileContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSourceFile(GoParser.SourceFileContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterPackageClause(GoParser.PackageClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitPackageClause(GoParser.PackageClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterImportDecl(GoParser.ImportDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitImportDecl(GoParser.ImportDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterImportSpec(GoParser.ImportSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitImportSpec(GoParser.ImportSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterImportPath(GoParser.ImportPathContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitImportPath(GoParser.ImportPathContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterDeclaration(GoParser.DeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitDeclaration(GoParser.DeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterConstDecl(GoParser.ConstDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitConstDecl(GoParser.ConstDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterConstSpec(GoParser.ConstSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitConstSpec(GoParser.ConstSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterIdentifierList(GoParser.IdentifierListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitIdentifierList(GoParser.IdentifierListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterExpressionList(GoParser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitExpressionList(GoParser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterComment(GoParser.CommentContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitComment(GoParser.CommentContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeDecl(GoParser.TypeDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeDecl(GoParser.TypeDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeSpec(GoParser.TypeSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeSpec(GoParser.TypeSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterAliasDecl(GoParser.AliasDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitAliasDecl(GoParser.AliasDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeDef(GoParser.TypeDefContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeDef(GoParser.TypeDefContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeParameters(GoParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeParameters(GoParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeParameterDecl(GoParser.TypeParameterDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeParameterDecl(GoParser.TypeParameterDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeElement(GoParser.TypeElementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeElement(GoParser.TypeElementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeTerm(GoParser.TypeTermContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeTerm(GoParser.TypeTermContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterFunctionDecl(GoParser.FunctionDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitFunctionDecl(GoParser.FunctionDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterMethodDecl(GoParser.MethodDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitMethodDecl(GoParser.MethodDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterReceiver(GoParser.ReceiverContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitReceiver(GoParser.ReceiverContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterVarDecl(GoParser.VarDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitVarDecl(GoParser.VarDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterVarSpec(GoParser.VarSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitVarSpec(GoParser.VarSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterBlock(GoParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitBlock(GoParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterStatementList(GoParser.StatementListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitStatementList(GoParser.StatementListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterStatement(GoParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitStatement(GoParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterSimpleStmt(GoParser.SimpleStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSimpleStmt(GoParser.SimpleStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterExpressionStmt(GoParser.ExpressionStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitExpressionStmt(GoParser.ExpressionStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterSendStmt(GoParser.SendStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSendStmt(GoParser.SendStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterIncDecStmt(GoParser.IncDecStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitIncDecStmt(GoParser.IncDecStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterAssignment(GoParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitAssignment(GoParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterAssign_op(GoParser.Assign_opContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitAssign_op(GoParser.Assign_opContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterShortVarDecl(GoParser.ShortVarDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitShortVarDecl(GoParser.ShortVarDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterLabeledStmt(GoParser.LabeledStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitLabeledStmt(GoParser.LabeledStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterReturnStmt(GoParser.ReturnStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitReturnStmt(GoParser.ReturnStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterBreakStmt(GoParser.BreakStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitBreakStmt(GoParser.BreakStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterContinueStmt(GoParser.ContinueStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitContinueStmt(GoParser.ContinueStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterGotoStmt(GoParser.GotoStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitGotoStmt(GoParser.GotoStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterFallthroughStmt(GoParser.FallthroughStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitFallthroughStmt(GoParser.FallthroughStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterDeferStmt(GoParser.DeferStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitDeferStmt(GoParser.DeferStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterIfStmt(GoParser.IfStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitIfStmt(GoParser.IfStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterSwitchStmt(GoParser.SwitchStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSwitchStmt(GoParser.SwitchStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterExprSwitchStmt(GoParser.ExprSwitchStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitExprSwitchStmt(GoParser.ExprSwitchStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterExprCaseClause(GoParser.ExprCaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitExprCaseClause(GoParser.ExprCaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterExprSwitchCase(GoParser.ExprSwitchCaseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitExprSwitchCase(GoParser.ExprSwitchCaseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeSwitchStmt(GoParser.TypeSwitchStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeSwitchStmt(GoParser.TypeSwitchStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeSwitchGuard(GoParser.TypeSwitchGuardContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeSwitchGuard(GoParser.TypeSwitchGuardContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeCaseClause(GoParser.TypeCaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeCaseClause(GoParser.TypeCaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeSwitchCase(GoParser.TypeSwitchCaseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeSwitchCase(GoParser.TypeSwitchCaseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeList(GoParser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeList(GoParser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterSelectStmt(GoParser.SelectStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSelectStmt(GoParser.SelectStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterCommClause(GoParser.CommClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitCommClause(GoParser.CommClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterCommCase(GoParser.CommCaseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitCommCase(GoParser.CommCaseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterRecvStmt(GoParser.RecvStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitRecvStmt(GoParser.RecvStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterForStmt(GoParser.ForStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitForStmt(GoParser.ForStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterForClause(GoParser.ForClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitForClause(GoParser.ForClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterRangeClause(GoParser.RangeClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitRangeClause(GoParser.RangeClauseContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterGoStmt(GoParser.GoStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitGoStmt(GoParser.GoStmtContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterType_(GoParser.Type_Context ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitType_(GoParser.Type_Context ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeArgs(GoParser.TypeArgsContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeArgs(GoParser.TypeArgsContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeName(GoParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeName(GoParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeLit(GoParser.TypeLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeLit(GoParser.TypeLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterArrayType(GoParser.ArrayTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitArrayType(GoParser.ArrayTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterArrayLength(GoParser.ArrayLengthContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitArrayLength(GoParser.ArrayLengthContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterElementType(GoParser.ElementTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitElementType(GoParser.ElementTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterPointerType(GoParser.PointerTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitPointerType(GoParser.PointerTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterInterfaceType(GoParser.InterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitInterfaceType(GoParser.InterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterSliceType(GoParser.SliceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSliceType(GoParser.SliceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterMapType(GoParser.MapTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitMapType(GoParser.MapTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterChannelType(GoParser.ChannelTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitChannelType(GoParser.ChannelTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterMethodSpec(GoParser.MethodSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitMethodSpec(GoParser.MethodSpecContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterFunctionType(GoParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitFunctionType(GoParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterSignature(GoParser.SignatureContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSignature(GoParser.SignatureContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterResult(GoParser.ResultContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitResult(GoParser.ResultContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterParameters(GoParser.ParametersContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitParameters(GoParser.ParametersContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterParameterDecl(GoParser.ParameterDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitParameterDecl(GoParser.ParameterDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterExpression(GoParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitExpression(GoParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterPrimaryExpr(GoParser.PrimaryExprContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitPrimaryExpr(GoParser.PrimaryExprContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterConversion(GoParser.ConversionContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitConversion(GoParser.ConversionContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterOperand(GoParser.OperandContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitOperand(GoParser.OperandContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterLiteral(GoParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitLiteral(GoParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterBasicLit(GoParser.BasicLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitBasicLit(GoParser.BasicLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterInteger(GoParser.IntegerContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitInteger(GoParser.IntegerContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterOperandName(GoParser.OperandNameContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitOperandName(GoParser.OperandNameContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterQualifiedIdent(GoParser.QualifiedIdentContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitQualifiedIdent(GoParser.QualifiedIdentContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterCompositeLit(GoParser.CompositeLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitCompositeLit(GoParser.CompositeLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterLiteralType(GoParser.LiteralTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitLiteralType(GoParser.LiteralTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterLiteralValue(GoParser.LiteralValueContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitLiteralValue(GoParser.LiteralValueContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterElementList(GoParser.ElementListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitElementList(GoParser.ElementListContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterKeyedElement(GoParser.KeyedElementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitKeyedElement(GoParser.KeyedElementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterKey(GoParser.KeyContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitKey(GoParser.KeyContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterElement(GoParser.ElementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitElement(GoParser.ElementContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterStructType(GoParser.StructTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitStructType(GoParser.StructTypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterFieldDecl(GoParser.FieldDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitFieldDecl(GoParser.FieldDeclContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterString_(GoParser.String_Context ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitString_(GoParser.String_Context ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterEmbeddedField(GoParser.EmbeddedFieldContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitEmbeddedField(GoParser.EmbeddedFieldContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterFunctionLit(GoParser.FunctionLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitFunctionLit(GoParser.FunctionLitContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterIndex(GoParser.IndexContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitIndex(GoParser.IndexContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterSlice_(GoParser.Slice_Context ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitSlice_(GoParser.Slice_Context ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterTypeAssertion(GoParser.TypeAssertionContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitTypeAssertion(GoParser.TypeAssertionContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterArguments(GoParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitArguments(GoParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterMethodExpr(GoParser.MethodExprContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitMethodExpr(GoParser.MethodExprContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterEos(GoParser.EosContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitEos(GoParser.EosContext ctx) { } + + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/jcommon/antlr/src/main/java/run/mone/antlr/golang/GoParserListener.java b/jcommon/antlr/src/main/java/run/mone/antlr/golang/GoParserListener.java new file mode 100644 index 000000000..63a6b2b43 --- /dev/null +++ b/jcommon/antlr/src/main/java/run/mone/antlr/golang/GoParserListener.java @@ -0,0 +1,1049 @@ +package run.mone.antlr.golang;// Generated from GoParser.g4 by ANTLR 4.7.1 +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link GoParser}. + */ +public interface GoParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link GoParser#sourceFile}. + * @param ctx the parse tree + */ + void enterSourceFile(GoParser.SourceFileContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#sourceFile}. + * @param ctx the parse tree + */ + void exitSourceFile(GoParser.SourceFileContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#packageClause}. + * @param ctx the parse tree + */ + void enterPackageClause(GoParser.PackageClauseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#packageClause}. + * @param ctx the parse tree + */ + void exitPackageClause(GoParser.PackageClauseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#importDecl}. + * @param ctx the parse tree + */ + void enterImportDecl(GoParser.ImportDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#importDecl}. + * @param ctx the parse tree + */ + void exitImportDecl(GoParser.ImportDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#importSpec}. + * @param ctx the parse tree + */ + void enterImportSpec(GoParser.ImportSpecContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#importSpec}. + * @param ctx the parse tree + */ + void exitImportSpec(GoParser.ImportSpecContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#importPath}. + * @param ctx the parse tree + */ + void enterImportPath(GoParser.ImportPathContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#importPath}. + * @param ctx the parse tree + */ + void exitImportPath(GoParser.ImportPathContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#declaration}. + * @param ctx the parse tree + */ + void enterDeclaration(GoParser.DeclarationContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#declaration}. + * @param ctx the parse tree + */ + void exitDeclaration(GoParser.DeclarationContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#constDecl}. + * @param ctx the parse tree + */ + void enterConstDecl(GoParser.ConstDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#constDecl}. + * @param ctx the parse tree + */ + void exitConstDecl(GoParser.ConstDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#constSpec}. + * @param ctx the parse tree + */ + void enterConstSpec(GoParser.ConstSpecContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#constSpec}. + * @param ctx the parse tree + */ + void exitConstSpec(GoParser.ConstSpecContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#identifierList}. + * @param ctx the parse tree + */ + void enterIdentifierList(GoParser.IdentifierListContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#identifierList}. + * @param ctx the parse tree + */ + void exitIdentifierList(GoParser.IdentifierListContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#expressionList}. + * @param ctx the parse tree + */ + void enterExpressionList(GoParser.ExpressionListContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#expressionList}. + * @param ctx the parse tree + */ + void exitExpressionList(GoParser.ExpressionListContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#comment}. + * @param ctx the parse tree + */ + void enterComment(GoParser.CommentContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#comment}. + * @param ctx the parse tree + */ + void exitComment(GoParser.CommentContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeDecl}. + * @param ctx the parse tree + */ + void enterTypeDecl(GoParser.TypeDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeDecl}. + * @param ctx the parse tree + */ + void exitTypeDecl(GoParser.TypeDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeSpec}. + * @param ctx the parse tree + */ + void enterTypeSpec(GoParser.TypeSpecContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeSpec}. + * @param ctx the parse tree + */ + void exitTypeSpec(GoParser.TypeSpecContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#aliasDecl}. + * @param ctx the parse tree + */ + void enterAliasDecl(GoParser.AliasDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#aliasDecl}. + * @param ctx the parse tree + */ + void exitAliasDecl(GoParser.AliasDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeDef}. + * @param ctx the parse tree + */ + void enterTypeDef(GoParser.TypeDefContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeDef}. + * @param ctx the parse tree + */ + void exitTypeDef(GoParser.TypeDefContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(GoParser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(GoParser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeParameterDecl}. + * @param ctx the parse tree + */ + void enterTypeParameterDecl(GoParser.TypeParameterDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeParameterDecl}. + * @param ctx the parse tree + */ + void exitTypeParameterDecl(GoParser.TypeParameterDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeElement}. + * @param ctx the parse tree + */ + void enterTypeElement(GoParser.TypeElementContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeElement}. + * @param ctx the parse tree + */ + void exitTypeElement(GoParser.TypeElementContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeTerm}. + * @param ctx the parse tree + */ + void enterTypeTerm(GoParser.TypeTermContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeTerm}. + * @param ctx the parse tree + */ + void exitTypeTerm(GoParser.TypeTermContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#functionDecl}. + * @param ctx the parse tree + */ + void enterFunctionDecl(GoParser.FunctionDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#functionDecl}. + * @param ctx the parse tree + */ + void exitFunctionDecl(GoParser.FunctionDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#methodDecl}. + * @param ctx the parse tree + */ + void enterMethodDecl(GoParser.MethodDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#methodDecl}. + * @param ctx the parse tree + */ + void exitMethodDecl(GoParser.MethodDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#receiver}. + * @param ctx the parse tree + */ + void enterReceiver(GoParser.ReceiverContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#receiver}. + * @param ctx the parse tree + */ + void exitReceiver(GoParser.ReceiverContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#varDecl}. + * @param ctx the parse tree + */ + void enterVarDecl(GoParser.VarDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#varDecl}. + * @param ctx the parse tree + */ + void exitVarDecl(GoParser.VarDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#varSpec}. + * @param ctx the parse tree + */ + void enterVarSpec(GoParser.VarSpecContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#varSpec}. + * @param ctx the parse tree + */ + void exitVarSpec(GoParser.VarSpecContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#block}. + * @param ctx the parse tree + */ + void enterBlock(GoParser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#block}. + * @param ctx the parse tree + */ + void exitBlock(GoParser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#statementList}. + * @param ctx the parse tree + */ + void enterStatementList(GoParser.StatementListContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#statementList}. + * @param ctx the parse tree + */ + void exitStatementList(GoParser.StatementListContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(GoParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(GoParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#simpleStmt}. + * @param ctx the parse tree + */ + void enterSimpleStmt(GoParser.SimpleStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#simpleStmt}. + * @param ctx the parse tree + */ + void exitSimpleStmt(GoParser.SimpleStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#expressionStmt}. + * @param ctx the parse tree + */ + void enterExpressionStmt(GoParser.ExpressionStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#expressionStmt}. + * @param ctx the parse tree + */ + void exitExpressionStmt(GoParser.ExpressionStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#sendStmt}. + * @param ctx the parse tree + */ + void enterSendStmt(GoParser.SendStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#sendStmt}. + * @param ctx the parse tree + */ + void exitSendStmt(GoParser.SendStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#incDecStmt}. + * @param ctx the parse tree + */ + void enterIncDecStmt(GoParser.IncDecStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#incDecStmt}. + * @param ctx the parse tree + */ + void exitIncDecStmt(GoParser.IncDecStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#assignment}. + * @param ctx the parse tree + */ + void enterAssignment(GoParser.AssignmentContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#assignment}. + * @param ctx the parse tree + */ + void exitAssignment(GoParser.AssignmentContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#assign_op}. + * @param ctx the parse tree + */ + void enterAssign_op(GoParser.Assign_opContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#assign_op}. + * @param ctx the parse tree + */ + void exitAssign_op(GoParser.Assign_opContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#shortVarDecl}. + * @param ctx the parse tree + */ + void enterShortVarDecl(GoParser.ShortVarDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#shortVarDecl}. + * @param ctx the parse tree + */ + void exitShortVarDecl(GoParser.ShortVarDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#labeledStmt}. + * @param ctx the parse tree + */ + void enterLabeledStmt(GoParser.LabeledStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#labeledStmt}. + * @param ctx the parse tree + */ + void exitLabeledStmt(GoParser.LabeledStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#returnStmt}. + * @param ctx the parse tree + */ + void enterReturnStmt(GoParser.ReturnStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#returnStmt}. + * @param ctx the parse tree + */ + void exitReturnStmt(GoParser.ReturnStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#breakStmt}. + * @param ctx the parse tree + */ + void enterBreakStmt(GoParser.BreakStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#breakStmt}. + * @param ctx the parse tree + */ + void exitBreakStmt(GoParser.BreakStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#continueStmt}. + * @param ctx the parse tree + */ + void enterContinueStmt(GoParser.ContinueStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#continueStmt}. + * @param ctx the parse tree + */ + void exitContinueStmt(GoParser.ContinueStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#gotoStmt}. + * @param ctx the parse tree + */ + void enterGotoStmt(GoParser.GotoStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#gotoStmt}. + * @param ctx the parse tree + */ + void exitGotoStmt(GoParser.GotoStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#fallthroughStmt}. + * @param ctx the parse tree + */ + void enterFallthroughStmt(GoParser.FallthroughStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#fallthroughStmt}. + * @param ctx the parse tree + */ + void exitFallthroughStmt(GoParser.FallthroughStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#deferStmt}. + * @param ctx the parse tree + */ + void enterDeferStmt(GoParser.DeferStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#deferStmt}. + * @param ctx the parse tree + */ + void exitDeferStmt(GoParser.DeferStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#ifStmt}. + * @param ctx the parse tree + */ + void enterIfStmt(GoParser.IfStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#ifStmt}. + * @param ctx the parse tree + */ + void exitIfStmt(GoParser.IfStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#switchStmt}. + * @param ctx the parse tree + */ + void enterSwitchStmt(GoParser.SwitchStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#switchStmt}. + * @param ctx the parse tree + */ + void exitSwitchStmt(GoParser.SwitchStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#exprSwitchStmt}. + * @param ctx the parse tree + */ + void enterExprSwitchStmt(GoParser.ExprSwitchStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#exprSwitchStmt}. + * @param ctx the parse tree + */ + void exitExprSwitchStmt(GoParser.ExprSwitchStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#exprCaseClause}. + * @param ctx the parse tree + */ + void enterExprCaseClause(GoParser.ExprCaseClauseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#exprCaseClause}. + * @param ctx the parse tree + */ + void exitExprCaseClause(GoParser.ExprCaseClauseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#exprSwitchCase}. + * @param ctx the parse tree + */ + void enterExprSwitchCase(GoParser.ExprSwitchCaseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#exprSwitchCase}. + * @param ctx the parse tree + */ + void exitExprSwitchCase(GoParser.ExprSwitchCaseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeSwitchStmt}. + * @param ctx the parse tree + */ + void enterTypeSwitchStmt(GoParser.TypeSwitchStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeSwitchStmt}. + * @param ctx the parse tree + */ + void exitTypeSwitchStmt(GoParser.TypeSwitchStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeSwitchGuard}. + * @param ctx the parse tree + */ + void enterTypeSwitchGuard(GoParser.TypeSwitchGuardContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeSwitchGuard}. + * @param ctx the parse tree + */ + void exitTypeSwitchGuard(GoParser.TypeSwitchGuardContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeCaseClause}. + * @param ctx the parse tree + */ + void enterTypeCaseClause(GoParser.TypeCaseClauseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeCaseClause}. + * @param ctx the parse tree + */ + void exitTypeCaseClause(GoParser.TypeCaseClauseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeSwitchCase}. + * @param ctx the parse tree + */ + void enterTypeSwitchCase(GoParser.TypeSwitchCaseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeSwitchCase}. + * @param ctx the parse tree + */ + void exitTypeSwitchCase(GoParser.TypeSwitchCaseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeList}. + * @param ctx the parse tree + */ + void enterTypeList(GoParser.TypeListContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeList}. + * @param ctx the parse tree + */ + void exitTypeList(GoParser.TypeListContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#selectStmt}. + * @param ctx the parse tree + */ + void enterSelectStmt(GoParser.SelectStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#selectStmt}. + * @param ctx the parse tree + */ + void exitSelectStmt(GoParser.SelectStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#commClause}. + * @param ctx the parse tree + */ + void enterCommClause(GoParser.CommClauseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#commClause}. + * @param ctx the parse tree + */ + void exitCommClause(GoParser.CommClauseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#commCase}. + * @param ctx the parse tree + */ + void enterCommCase(GoParser.CommCaseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#commCase}. + * @param ctx the parse tree + */ + void exitCommCase(GoParser.CommCaseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#recvStmt}. + * @param ctx the parse tree + */ + void enterRecvStmt(GoParser.RecvStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#recvStmt}. + * @param ctx the parse tree + */ + void exitRecvStmt(GoParser.RecvStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#forStmt}. + * @param ctx the parse tree + */ + void enterForStmt(GoParser.ForStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#forStmt}. + * @param ctx the parse tree + */ + void exitForStmt(GoParser.ForStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#forClause}. + * @param ctx the parse tree + */ + void enterForClause(GoParser.ForClauseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#forClause}. + * @param ctx the parse tree + */ + void exitForClause(GoParser.ForClauseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#rangeClause}. + * @param ctx the parse tree + */ + void enterRangeClause(GoParser.RangeClauseContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#rangeClause}. + * @param ctx the parse tree + */ + void exitRangeClause(GoParser.RangeClauseContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#goStmt}. + * @param ctx the parse tree + */ + void enterGoStmt(GoParser.GoStmtContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#goStmt}. + * @param ctx the parse tree + */ + void exitGoStmt(GoParser.GoStmtContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#type_}. + * @param ctx the parse tree + */ + void enterType_(GoParser.Type_Context ctx); + /** + * Exit a parse tree produced by {@link GoParser#type_}. + * @param ctx the parse tree + */ + void exitType_(GoParser.Type_Context ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeArgs}. + * @param ctx the parse tree + */ + void enterTypeArgs(GoParser.TypeArgsContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeArgs}. + * @param ctx the parse tree + */ + void exitTypeArgs(GoParser.TypeArgsContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeName}. + * @param ctx the parse tree + */ + void enterTypeName(GoParser.TypeNameContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeName}. + * @param ctx the parse tree + */ + void exitTypeName(GoParser.TypeNameContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeLit}. + * @param ctx the parse tree + */ + void enterTypeLit(GoParser.TypeLitContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeLit}. + * @param ctx the parse tree + */ + void exitTypeLit(GoParser.TypeLitContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#arrayType}. + * @param ctx the parse tree + */ + void enterArrayType(GoParser.ArrayTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#arrayType}. + * @param ctx the parse tree + */ + void exitArrayType(GoParser.ArrayTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#arrayLength}. + * @param ctx the parse tree + */ + void enterArrayLength(GoParser.ArrayLengthContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#arrayLength}. + * @param ctx the parse tree + */ + void exitArrayLength(GoParser.ArrayLengthContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#elementType}. + * @param ctx the parse tree + */ + void enterElementType(GoParser.ElementTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#elementType}. + * @param ctx the parse tree + */ + void exitElementType(GoParser.ElementTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#pointerType}. + * @param ctx the parse tree + */ + void enterPointerType(GoParser.PointerTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#pointerType}. + * @param ctx the parse tree + */ + void exitPointerType(GoParser.PointerTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#interfaceType}. + * @param ctx the parse tree + */ + void enterInterfaceType(GoParser.InterfaceTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#interfaceType}. + * @param ctx the parse tree + */ + void exitInterfaceType(GoParser.InterfaceTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#sliceType}. + * @param ctx the parse tree + */ + void enterSliceType(GoParser.SliceTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#sliceType}. + * @param ctx the parse tree + */ + void exitSliceType(GoParser.SliceTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#mapType}. + * @param ctx the parse tree + */ + void enterMapType(GoParser.MapTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#mapType}. + * @param ctx the parse tree + */ + void exitMapType(GoParser.MapTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#channelType}. + * @param ctx the parse tree + */ + void enterChannelType(GoParser.ChannelTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#channelType}. + * @param ctx the parse tree + */ + void exitChannelType(GoParser.ChannelTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#methodSpec}. + * @param ctx the parse tree + */ + void enterMethodSpec(GoParser.MethodSpecContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#methodSpec}. + * @param ctx the parse tree + */ + void exitMethodSpec(GoParser.MethodSpecContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#functionType}. + * @param ctx the parse tree + */ + void enterFunctionType(GoParser.FunctionTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#functionType}. + * @param ctx the parse tree + */ + void exitFunctionType(GoParser.FunctionTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#signature}. + * @param ctx the parse tree + */ + void enterSignature(GoParser.SignatureContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#signature}. + * @param ctx the parse tree + */ + void exitSignature(GoParser.SignatureContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#result}. + * @param ctx the parse tree + */ + void enterResult(GoParser.ResultContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#result}. + * @param ctx the parse tree + */ + void exitResult(GoParser.ResultContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#parameters}. + * @param ctx the parse tree + */ + void enterParameters(GoParser.ParametersContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#parameters}. + * @param ctx the parse tree + */ + void exitParameters(GoParser.ParametersContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#parameterDecl}. + * @param ctx the parse tree + */ + void enterParameterDecl(GoParser.ParameterDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#parameterDecl}. + * @param ctx the parse tree + */ + void exitParameterDecl(GoParser.ParameterDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(GoParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(GoParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#primaryExpr}. + * @param ctx the parse tree + */ + void enterPrimaryExpr(GoParser.PrimaryExprContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#primaryExpr}. + * @param ctx the parse tree + */ + void exitPrimaryExpr(GoParser.PrimaryExprContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#conversion}. + * @param ctx the parse tree + */ + void enterConversion(GoParser.ConversionContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#conversion}. + * @param ctx the parse tree + */ + void exitConversion(GoParser.ConversionContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#operand}. + * @param ctx the parse tree + */ + void enterOperand(GoParser.OperandContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#operand}. + * @param ctx the parse tree + */ + void exitOperand(GoParser.OperandContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(GoParser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(GoParser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#basicLit}. + * @param ctx the parse tree + */ + void enterBasicLit(GoParser.BasicLitContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#basicLit}. + * @param ctx the parse tree + */ + void exitBasicLit(GoParser.BasicLitContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#integer}. + * @param ctx the parse tree + */ + void enterInteger(GoParser.IntegerContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#integer}. + * @param ctx the parse tree + */ + void exitInteger(GoParser.IntegerContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#operandName}. + * @param ctx the parse tree + */ + void enterOperandName(GoParser.OperandNameContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#operandName}. + * @param ctx the parse tree + */ + void exitOperandName(GoParser.OperandNameContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#qualifiedIdent}. + * @param ctx the parse tree + */ + void enterQualifiedIdent(GoParser.QualifiedIdentContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#qualifiedIdent}. + * @param ctx the parse tree + */ + void exitQualifiedIdent(GoParser.QualifiedIdentContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#compositeLit}. + * @param ctx the parse tree + */ + void enterCompositeLit(GoParser.CompositeLitContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#compositeLit}. + * @param ctx the parse tree + */ + void exitCompositeLit(GoParser.CompositeLitContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#literalType}. + * @param ctx the parse tree + */ + void enterLiteralType(GoParser.LiteralTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#literalType}. + * @param ctx the parse tree + */ + void exitLiteralType(GoParser.LiteralTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#literalValue}. + * @param ctx the parse tree + */ + void enterLiteralValue(GoParser.LiteralValueContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#literalValue}. + * @param ctx the parse tree + */ + void exitLiteralValue(GoParser.LiteralValueContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#elementList}. + * @param ctx the parse tree + */ + void enterElementList(GoParser.ElementListContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#elementList}. + * @param ctx the parse tree + */ + void exitElementList(GoParser.ElementListContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#keyedElement}. + * @param ctx the parse tree + */ + void enterKeyedElement(GoParser.KeyedElementContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#keyedElement}. + * @param ctx the parse tree + */ + void exitKeyedElement(GoParser.KeyedElementContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#key}. + * @param ctx the parse tree + */ + void enterKey(GoParser.KeyContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#key}. + * @param ctx the parse tree + */ + void exitKey(GoParser.KeyContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#element}. + * @param ctx the parse tree + */ + void enterElement(GoParser.ElementContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#element}. + * @param ctx the parse tree + */ + void exitElement(GoParser.ElementContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#structType}. + * @param ctx the parse tree + */ + void enterStructType(GoParser.StructTypeContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#structType}. + * @param ctx the parse tree + */ + void exitStructType(GoParser.StructTypeContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#fieldDecl}. + * @param ctx the parse tree + */ + void enterFieldDecl(GoParser.FieldDeclContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#fieldDecl}. + * @param ctx the parse tree + */ + void exitFieldDecl(GoParser.FieldDeclContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#string_}. + * @param ctx the parse tree + */ + void enterString_(GoParser.String_Context ctx); + /** + * Exit a parse tree produced by {@link GoParser#string_}. + * @param ctx the parse tree + */ + void exitString_(GoParser.String_Context ctx); + /** + * Enter a parse tree produced by {@link GoParser#embeddedField}. + * @param ctx the parse tree + */ + void enterEmbeddedField(GoParser.EmbeddedFieldContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#embeddedField}. + * @param ctx the parse tree + */ + void exitEmbeddedField(GoParser.EmbeddedFieldContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#functionLit}. + * @param ctx the parse tree + */ + void enterFunctionLit(GoParser.FunctionLitContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#functionLit}. + * @param ctx the parse tree + */ + void exitFunctionLit(GoParser.FunctionLitContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#index}. + * @param ctx the parse tree + */ + void enterIndex(GoParser.IndexContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#index}. + * @param ctx the parse tree + */ + void exitIndex(GoParser.IndexContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#slice_}. + * @param ctx the parse tree + */ + void enterSlice_(GoParser.Slice_Context ctx); + /** + * Exit a parse tree produced by {@link GoParser#slice_}. + * @param ctx the parse tree + */ + void exitSlice_(GoParser.Slice_Context ctx); + /** + * Enter a parse tree produced by {@link GoParser#typeAssertion}. + * @param ctx the parse tree + */ + void enterTypeAssertion(GoParser.TypeAssertionContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#typeAssertion}. + * @param ctx the parse tree + */ + void exitTypeAssertion(GoParser.TypeAssertionContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(GoParser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(GoParser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#methodExpr}. + * @param ctx the parse tree + */ + void enterMethodExpr(GoParser.MethodExprContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#methodExpr}. + * @param ctx the parse tree + */ + void exitMethodExpr(GoParser.MethodExprContext ctx); + /** + * Enter a parse tree produced by {@link GoParser#eos}. + * @param ctx the parse tree + */ + void enterEos(GoParser.EosContext ctx); + /** + * Exit a parse tree produced by {@link GoParser#eos}. + * @param ctx the parse tree + */ + void exitEos(GoParser.EosContext ctx); +} \ No newline at end of file diff --git a/jcommon/antlr/src/main/resources/antlr/antlr_help.md b/jcommon/antlr/src/main/resources/antlr/antlr_help.md index 4aef45a03..eda9e775d 100644 --- a/jcommon/antlr/src/main/resources/antlr/antlr_help.md +++ b/jcommon/antlr/src/main/resources/antlr/antlr_help.md @@ -8,6 +8,8 @@ + antlr4 -package com.xiaomi.data.push.antlr.java8 -o /Users/zzy/IdeaProjects/mione/jcommon/antlr/src/main/java/com/xiaomi/data/push/antlr/java8 *.g4 ++ antlr4 -package run.mone.antlr.golang -o /Users/zhangzhiyong/IdeaProjects/goodjava/mone/jcommon/antlr/src/main/resources/antlr/golang/ GoParser.g4 + + antlr4 -package com.xiaomi.data.push.antlr.java8 -o /Users/zzy/IdeaProjects/mione/jcommon/antlr/src/main/java/com/xiaomi/data/push/antlr/java8 Java8.g4 + https://github.com/antlr/codebuff/tree/master/grammars/org/antlr/codebuff diff --git a/jcommon/antlr/src/main/resources/antlr/golang/GoLexer.g4 b/jcommon/antlr/src/main/resources/antlr/golang/GoLexer.g4 new file mode 100644 index 000000000..7f6c80711 --- /dev/null +++ b/jcommon/antlr/src/main/resources/antlr/golang/GoLexer.g4 @@ -0,0 +1,231 @@ +/* + [The "BSD licence"] + Copyright (c) 2017 Sasa Coh, Michał Błotniak + Copyright (c) 2019 Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies + Copyright (c) 2019 Dmitry Rassadin, flipparassa@gmail.com, Positive Technologies + Copyright (c) 2021 Martin Mirchev, mirchevmartin2203@gmail.com + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * A Go grammar for ANTLR 4 derived from the Go Language Specification + * https://golang.org/ref/spec + */ + +// $antlr-format alignTrailingComments true, columnLimit 150, maxEmptyLinesToKeep 1, reflowComments false, useTab false +// $antlr-format allowShortRulesOnASingleLine true, allowShortBlocksOnASingleLine true, minEmptyLines 0, alignSemicolons ownLine +// $antlr-format alignColons trailing, singleLineOverrulesHangingColon true, alignLexerCommands true, alignLabels true, alignTrailers true + +lexer grammar GoLexer; + +// Keywords + +BREAK : 'break' -> mode(NLSEMI); +DEFAULT : 'default'; +FUNC : 'func'; +INTERFACE : 'interface'; +SELECT : 'select'; +CASE : 'case'; +DEFER : 'defer'; +GO : 'go'; +MAP : 'map'; +STRUCT : 'struct'; +CHAN : 'chan'; +ELSE : 'else'; +GOTO : 'goto'; +PACKAGE : 'package'; +SWITCH : 'switch'; +CONST : 'const'; +FALLTHROUGH : 'fallthrough' -> mode(NLSEMI); +IF : 'if'; +RANGE : 'range'; +TYPE : 'type'; +CONTINUE : 'continue' -> mode(NLSEMI); +FOR : 'for'; +IMPORT : 'import'; +RETURN : 'return' -> mode(NLSEMI); +VAR : 'var'; + +NIL_LIT: 'nil' -> mode(NLSEMI); + +IDENTIFIER: LETTER (LETTER | UNICODE_DIGIT)* -> mode(NLSEMI); + +// Punctuation + +L_PAREN : '('; +R_PAREN : ')' -> mode(NLSEMI); +L_CURLY : '{'; +R_CURLY : '}' -> mode(NLSEMI); +L_BRACKET : '['; +R_BRACKET : ']' -> mode(NLSEMI); +ASSIGN : '='; +COMMA : ','; +SEMI : ';'; +COLON : ':'; +DOT : '.'; +PLUS_PLUS : '++' -> mode(NLSEMI); +MINUS_MINUS : '--' -> mode(NLSEMI); +DECLARE_ASSIGN : ':='; +ELLIPSIS : '...'; + +// Logical + +LOGICAL_OR : '||'; +LOGICAL_AND : '&&'; + +// Relation operators + +EQUALS : '=='; +NOT_EQUALS : '!='; +LESS : '<'; +LESS_OR_EQUALS : '<='; +GREATER : '>'; +GREATER_OR_EQUALS : '>='; + +// Arithmetic operators + +OR : '|'; +DIV : '/'; +MOD : '%'; +LSHIFT : '<<'; +RSHIFT : '>>'; +BIT_CLEAR : '&^'; +UNDERLYING : '~'; + +// Unary operators + +EXCLAMATION: '!'; + +// Mixed operators + +PLUS : '+'; +MINUS : '-'; +CARET : '^'; +STAR : '*'; +AMPERSAND : '&'; +RECEIVE : '<-'; + +// Number literals + +DECIMAL_LIT : ('0' | [1-9] ('_'? [0-9])*) -> mode(NLSEMI); +BINARY_LIT : '0' [bB] ('_'? BIN_DIGIT)+ -> mode(NLSEMI); +OCTAL_LIT : '0' [oO]? ('_'? OCTAL_DIGIT)+ -> mode(NLSEMI); +HEX_LIT : '0' [xX] ('_'? HEX_DIGIT)+ -> mode(NLSEMI); + +FLOAT_LIT: (DECIMAL_FLOAT_LIT | HEX_FLOAT_LIT) -> mode(NLSEMI); + +DECIMAL_FLOAT_LIT: DECIMALS ('.' DECIMALS? EXPONENT? | EXPONENT) | '.' DECIMALS EXPONENT?; + +HEX_FLOAT_LIT: '0' [xX] HEX_MANTISSA HEX_EXPONENT; + +fragment HEX_MANTISSA: + ('_'? HEX_DIGIT)+ ('.' ( '_'? HEX_DIGIT)*)? + | '.' HEX_DIGIT ('_'? HEX_DIGIT)* +; + +fragment HEX_EXPONENT: [pP] [+-]? DECIMALS; + +IMAGINARY_LIT: (DECIMAL_LIT | BINARY_LIT | OCTAL_LIT | HEX_LIT | FLOAT_LIT) 'i' -> mode(NLSEMI); + +// Rune literals + +fragment RUNE: '\'' (UNICODE_VALUE | BYTE_VALUE) '\''; //: '\'' (~[\n\\] | ESCAPED_VALUE) '\''; + +RUNE_LIT: RUNE -> mode(NLSEMI); + +BYTE_VALUE: OCTAL_BYTE_VALUE | HEX_BYTE_VALUE; + +OCTAL_BYTE_VALUE: '\\' OCTAL_DIGIT OCTAL_DIGIT OCTAL_DIGIT; + +HEX_BYTE_VALUE: '\\' 'x' HEX_DIGIT HEX_DIGIT; + +LITTLE_U_VALUE: '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT; + +BIG_U_VALUE: + '\\' 'U' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT +; + +// String literals + +RAW_STRING_LIT : '`' ~'`'* '`' -> mode(NLSEMI); +INTERPRETED_STRING_LIT : '"' (~["\\] | ESCAPED_VALUE)* '"' -> mode(NLSEMI); + +// Hidden tokens + +WS : [ \t]+ -> channel(HIDDEN); +COMMENT : '/*' .*? '*/' -> channel(HIDDEN); +TERMINATOR : [\r\n]+ -> channel(HIDDEN); +LINE_COMMENT : '//' ~[\r\n]* -> channel(HIDDEN); + + +NEWLINE : '\r'? '\n' | '\r'+ | '\n'+; + +//COMMENT : '/*' .*? '*/'; +//LINE_COMMENT : '//' ~[\r\n]*; + + +fragment UNICODE_VALUE: ~[\r\n'] | LITTLE_U_VALUE | BIG_U_VALUE | ESCAPED_VALUE; + +// Fragments + +fragment ESCAPED_VALUE: + '\\' ( + 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT + | 'U' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT + | [abfnrtv\\'"] + | OCTAL_DIGIT OCTAL_DIGIT OCTAL_DIGIT + | 'x' HEX_DIGIT HEX_DIGIT + ) +; + +fragment DECIMALS: [0-9] ('_'? [0-9])*; + +fragment OCTAL_DIGIT: [0-7]; + +fragment HEX_DIGIT: [0-9a-fA-F]; + +fragment BIN_DIGIT: [01]; + +fragment EXPONENT: [eE] [+-]? DECIMALS; + +fragment LETTER: UNICODE_LETTER | '_'; + +//[\p{Nd}] matches a digit zero through nine in any script except ideographic scripts +fragment UNICODE_DIGIT: [\p{Nd}]; +//[\p{L}] matches any kind of letter from any language +fragment UNICODE_LETTER: [\p{L}]; + +mode NLSEMI; + +// Treat whitespace as normal +WS_NLSEMI: [ \t]+ -> channel(HIDDEN); +// Ignore any comments that only span one line +COMMENT_NLSEMI : '/*' ~[\r\n]*? '*/' -> channel(HIDDEN); +LINE_COMMENT_NLSEMI : '//' ~[\r\n]* -> channel(HIDDEN); +// Emit an EOS token for any newlines, semicolon, multiline comments or the EOF and +//return to normal lexing +EOS: ([\r\n]+ | ';' | '/*' .*? '*/' | EOF) -> mode(DEFAULT_MODE); +// Did not find an EOS, so go back to normal lexing +OTHER: -> mode(DEFAULT_MODE), channel(HIDDEN); \ No newline at end of file diff --git a/jcommon/antlr/src/main/resources/antlr/golang/GoParser.g4 b/jcommon/antlr/src/main/resources/antlr/golang/GoParser.g4 new file mode 100644 index 000000000..fc4c30033 --- /dev/null +++ b/jcommon/antlr/src/main/resources/antlr/golang/GoParser.g4 @@ -0,0 +1,533 @@ +/* + [The "BSD licence"] Copyright (c) 2017 Sasa Coh, Michał Błotniak + Copyright (c) 2019 Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies + Copyright (c) 2019 Dmitry Rassadin, flipparassa@gmail.com,Positive Technologies All rights reserved. + Copyright (c) 2021 Martin Mirchev, mirchevmartin2203@gmail.com + Copyright (c) 2023 Dmitry Litovchenko, i@dlitovchenko.ru + + Redistribution and use in source and binary forms, with or without modification, are permitted + provided that the following conditions are met: 1. Redistributions of source code must retain the + above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in + binary form must reproduce the above copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided with the distribution. 3. The name + of the author may not be used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * A Go grammar for ANTLR 4 derived from the Go Language Specification https://golang.org/ref/spec + */ + +// $antlr-format alignTrailingComments true, columnLimit 150, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments false, useTab false +// $antlr-format allowShortRulesOnASingleLine false, allowShortBlocksOnASingleLine true, alignSemicolons hanging, alignColons hanging + +parser grammar GoParser; + +options { + tokenVocab = GoLexer; + superClass = GoParserBase; +} + +sourceFile + : packageClause eos (importDecl eos)* ((functionDecl | methodDecl | declaration) eos)* EOF + ; + +packageClause + : PACKAGE packageName = IDENTIFIER + ; + +importDecl + : IMPORT (importSpec | L_PAREN (importSpec eos)* R_PAREN) + ; + +importSpec + : alias = (DOT | IDENTIFIER)? importPath + ; + +importPath + : string_ + ; + +declaration + : constDecl + | typeDecl + | varDecl + ; + +constDecl + : CONST (constSpec | L_PAREN (constSpec eos)* R_PAREN) + ; + +constSpec + : identifierList (type_? ASSIGN expressionList)? + ; + +identifierList + : IDENTIFIER (COMMA IDENTIFIER)* + ; + +expressionList + : expression (COMMA expression)* + ; + +comment + : COMMENT + | LINE_COMMENT + ; + +typeDecl + : comment* TYPE (typeSpec | L_PAREN (typeSpec eos)* R_PAREN) + ; + +typeSpec + : aliasDecl + | typeDef + ; + +aliasDecl + : IDENTIFIER ASSIGN type_ + ; + +typeDef + : IDENTIFIER typeParameters? type_ + ; + +typeParameters + : L_BRACKET typeParameterDecl (COMMA typeParameterDecl)* R_BRACKET + ; + +typeParameterDecl + : identifierList typeElement + ; + +typeElement + : typeTerm (OR typeTerm)* + ; + +typeTerm + : UNDERLYING? type_ + ; + +// Function declarations +functionDecl + : FUNC IDENTIFIER typeParameters? signature block? + ; + +methodDecl + : FUNC receiver IDENTIFIER signature block? + ; + +receiver + : parameters + ; + +varDecl + : VAR (varSpec | L_PAREN (varSpec eos)* R_PAREN) + ; + +varSpec + : identifierList (type_ (ASSIGN expressionList)? | ASSIGN expressionList) + ; + +block + : L_CURLY statementList? R_CURLY + ; + +statementList + : ((SEMI? | EOS? | {this.closingBracket()}?) statement eos)+ + ; + +statement + : declaration + | labeledStmt + | simpleStmt + | goStmt + | returnStmt + | breakStmt + | continueStmt + | gotoStmt + | fallthroughStmt + | block + | ifStmt + | switchStmt + | selectStmt + | forStmt + | deferStmt + ; + +simpleStmt + : sendStmt + | incDecStmt + | assignment + | expressionStmt + | shortVarDecl + ; + +expressionStmt + : expression + ; + +sendStmt + : channel = expression RECEIVE expression + ; + +incDecStmt + : expression (PLUS_PLUS | MINUS_MINUS) + ; + +assignment + : expressionList assign_op expressionList + ; + +assign_op + : (PLUS | MINUS | OR | CARET | STAR | DIV | MOD | LSHIFT | RSHIFT | AMPERSAND | BIT_CLEAR)? ASSIGN + ; + +shortVarDecl + : identifierList DECLARE_ASSIGN expressionList + ; + +labeledStmt + : IDENTIFIER COLON statement? + ; + +returnStmt + : RETURN expressionList? + ; + +breakStmt + : BREAK IDENTIFIER? + ; + +continueStmt + : CONTINUE IDENTIFIER? + ; + +gotoStmt + : GOTO IDENTIFIER + ; + +fallthroughStmt + : FALLTHROUGH + ; + +deferStmt + : DEFER expression + ; + +ifStmt + : IF (expression | eos expression | simpleStmt eos expression) block (ELSE (ifStmt | block))? + ; + +switchStmt + : exprSwitchStmt + | typeSwitchStmt + ; + +exprSwitchStmt + : SWITCH (expression? | simpleStmt? eos expression?) L_CURLY exprCaseClause* R_CURLY + ; + +exprCaseClause + : exprSwitchCase COLON statementList? + ; + +exprSwitchCase + : CASE expressionList + | DEFAULT + ; + +typeSwitchStmt + : SWITCH (typeSwitchGuard | eos typeSwitchGuard | simpleStmt eos typeSwitchGuard) L_CURLY typeCaseClause* R_CURLY + ; + +typeSwitchGuard + : (IDENTIFIER DECLARE_ASSIGN)? primaryExpr DOT L_PAREN TYPE R_PAREN + ; + +typeCaseClause + : typeSwitchCase COLON statementList? + ; + +typeSwitchCase + : CASE typeList + | DEFAULT + ; + +typeList + : (type_ | NIL_LIT) (COMMA (type_ | NIL_LIT))* + ; + +selectStmt + : SELECT L_CURLY commClause* R_CURLY + ; + +commClause + : commCase COLON statementList? + ; + +commCase + : CASE (sendStmt | recvStmt) + | DEFAULT + ; + +recvStmt + : (expressionList ASSIGN | identifierList DECLARE_ASSIGN)? recvExpr = expression + ; + +forStmt + : FOR (expression? | forClause | rangeClause?) block + ; + +forClause + : initStmt = simpleStmt? eos expression? eos postStmt = simpleStmt? + ; + +rangeClause + : (expressionList ASSIGN | identifierList DECLARE_ASSIGN)? RANGE expression + ; + +goStmt + : GO expression + ; + +type_ + : typeName typeArgs? + | typeLit + | L_PAREN type_ R_PAREN + ; + +typeArgs + : L_BRACKET typeList COMMA? R_BRACKET + ; + +typeName + : qualifiedIdent + | IDENTIFIER + ; + +typeLit + : arrayType + | structType + | pointerType + | functionType + | interfaceType + | sliceType + | mapType + | channelType + ; + +arrayType + : L_BRACKET arrayLength R_BRACKET elementType + ; + +arrayLength + : expression + ; + +elementType + : type_ + ; + +pointerType + : STAR type_ + ; + +interfaceType + : INTERFACE L_CURLY ((methodSpec | typeElement) eos)* R_CURLY + ; + +sliceType + : L_BRACKET R_BRACKET elementType + ; + +// It's possible to replace `type` with more restricted typeLit list and also pay attention to nil maps +mapType + : MAP L_BRACKET type_ R_BRACKET elementType + ; + +channelType + : (CHAN | CHAN RECEIVE | RECEIVE CHAN) elementType + ; + +methodSpec + : IDENTIFIER parameters result + | IDENTIFIER parameters + ; + +functionType + : FUNC signature + ; + +signature + : parameters result? + ; + +result + : parameters + | type_ + ; + +parameters + : L_PAREN (parameterDecl (COMMA parameterDecl)* COMMA?)? R_PAREN + ; + +parameterDecl + : identifierList? ELLIPSIS? type_ + ; + +expression + : primaryExpr + | unary_op = (PLUS | MINUS | EXCLAMATION | CARET | STAR | AMPERSAND | RECEIVE) expression + | expression mul_op = (STAR | DIV | MOD | LSHIFT | RSHIFT | AMPERSAND | BIT_CLEAR) expression + | expression add_op = (PLUS | MINUS | OR | CARET) expression + | expression rel_op = ( + EQUALS + | NOT_EQUALS + | LESS + | LESS_OR_EQUALS + | GREATER + | GREATER_OR_EQUALS + ) expression + | expression LOGICAL_AND expression + | expression LOGICAL_OR expression + ; + +primaryExpr + : operand + | conversion + | methodExpr + | primaryExpr ( DOT IDENTIFIER | index | slice_ | typeAssertion | arguments) + ; + +conversion + : type_ L_PAREN expression COMMA? R_PAREN + ; + +operand + : literal + | operandName typeArgs? + | L_PAREN expression R_PAREN + ; + +literal + : basicLit + | compositeLit + | functionLit + ; + +basicLit + : NIL_LIT + | integer + | string_ + | FLOAT_LIT + ; + +integer + : DECIMAL_LIT + | BINARY_LIT + | OCTAL_LIT + | HEX_LIT + | IMAGINARY_LIT + | RUNE_LIT + ; + +operandName + : IDENTIFIER + ; + +qualifiedIdent + : IDENTIFIER DOT IDENTIFIER + ; + +compositeLit + : literalType literalValue + ; + +literalType + : structType + | arrayType + | L_BRACKET ELLIPSIS R_BRACKET elementType + | sliceType + | mapType + | typeName typeArgs? + ; + +literalValue + : L_CURLY (elementList COMMA?)? R_CURLY + ; + +elementList + : keyedElement (COMMA keyedElement)* + ; + +keyedElement + : (key COLON)? element + ; + +key + : expression + | literalValue + ; + +element + : expression + | literalValue + ; + +structType + : STRUCT L_CURLY (fieldDecl eos)* R_CURLY + ; + +fieldDecl + : (identifierList type_ | embeddedField) tag = string_? + ; + +string_ + : RAW_STRING_LIT + | INTERPRETED_STRING_LIT + ; + +embeddedField + : STAR? typeName typeArgs? + ; + +functionLit + : FUNC signature block + ; // function + +index + : L_BRACKET expression R_BRACKET + ; + +slice_ + : L_BRACKET (expression? COLON expression? | expression? COLON expression COLON expression) R_BRACKET + ; + +typeAssertion + : DOT L_PAREN type_ R_PAREN + ; + +arguments + : L_PAREN ((expressionList | type_ (COMMA expressionList)?) ELLIPSIS? COMMA?)? R_PAREN + ; + +methodExpr + : type_ DOT IDENTIFIER + ; + +eos + : SEMI + | EOF + | EOS + | {this.closingBracket()}? + ; \ No newline at end of file diff --git a/jcommon/antlr/src/main/resources/antlr/java8/Java8.g4 b/jcommon/antlr/src/main/resources/antlr/java8/Java8.g4 deleted file mode 100644 index 3ef033b4c..000000000 --- a/jcommon/antlr/src/main/resources/antlr/java8/Java8.g4 +++ /dev/null @@ -1,1779 +0,0 @@ -/* - * [The "BSD license"] - * Copyright (c) 2014 Terence Parr - * Copyright (c) 2014 Sam Harwell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * A Java 8 grammar for ANTLR 4 derived from the Java Language Specification - * chapter 19. - * - * NOTE: This grammar results in a generated parser that is much slower - * than the Java 7 grammar in the grammars-v4/java directory. This - * one is, however, extremely close to the spec. - * - * You can test with - * - * $ antlr4 Java8.g4 - * $ javac *.java - * $ grun Java8 compilationUnit *.java - * - * Or, -~/antlr/code/grammars-v4/java8 $ java Test . -/Users/parrt/antlr/code/grammars-v4/java8/./Java8BaseListener.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Lexer.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Listener.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Parser.java -/Users/parrt/antlr/code/grammars-v4/java8/./Test.java -Total lexer+parser time 30844ms. - */ -grammar Java8; - -/* - * Productions from §3 (Lexical Structure) - */ - -literal - : IntegerLiteral - | FloatingPointLiteral - | BooleanLiteral - | CharacterLiteral - | StringLiteral - | NullLiteral - ; - -/* - * Productions from §4 (Types, Values, and Variables) - */ - -type - : primitiveType - | referenceType - ; - -primitiveType - : annotation* numericType - | annotation* 'boolean' - ; - -numericType - : integralType - | floatingPointType - ; - -integralType - : 'byte' - | 'short' - | 'int' - | 'long' - | 'char' - ; - -floatingPointType - : 'float' - | 'double' - ; - -referenceType - : classOrInterfaceType - | typeVariable - | arrayType - ; - -classOrInterfaceType - : ( classType_lfno_classOrInterfaceType - | interfaceType_lfno_classOrInterfaceType - ) - ( classType_lf_classOrInterfaceType - | interfaceType_lf_classOrInterfaceType - )* - ; - -classType - : annotation* Identifier typeArguments? - | classOrInterfaceType '.' annotation* Identifier typeArguments? - ; - -classType_lf_classOrInterfaceType - : '.' annotation* Identifier typeArguments? - ; - -classType_lfno_classOrInterfaceType - : annotation* Identifier typeArguments? - ; - -interfaceType - : classType - ; - -interfaceType_lf_classOrInterfaceType - : classType_lf_classOrInterfaceType - ; - -interfaceType_lfno_classOrInterfaceType - : classType_lfno_classOrInterfaceType - ; - -typeVariable - : annotation* Identifier - ; - -arrayType - : primitiveType dims - | classOrInterfaceType dims - | typeVariable dims - ; - -dims - : annotation* '[' ']' (annotation* '[' ']')* - ; - -typeParameter - : typeParameterModifier* Identifier typeBound? - ; - -typeParameterModifier - : annotation - ; - -typeBound - : 'extends' typeVariable - | 'extends' classOrInterfaceType additionalBound* - ; - -additionalBound - : '&' interfaceType - ; - -typeArguments - : '<' typeArgumentList '>' - ; - -typeArgumentList - : typeArgument (',' typeArgument)* - ; - -typeArgument - : referenceType - | wildcard - ; - -wildcard - : annotation* '?' wildcardBounds? - ; - -wildcardBounds - : 'extends' referenceType - | 'super' referenceType - ; - -/* - * Productions from §6 (Names) - */ - -packageName - : Identifier - | packageName '.' Identifier - ; - -typeName - : Identifier - | packageOrTypeName '.' Identifier - ; - -packageOrTypeName - : Identifier - | packageOrTypeName '.' Identifier - ; - -expressionName - : Identifier - | ambiguousName '.' Identifier - ; - -methodName - : Identifier - ; - -ambiguousName - : Identifier - | ambiguousName '.' Identifier - ; - -/* - * Productions from §7 (Packages) - */ - -compilationUnit - : packageDeclaration? importDeclaration* typeDeclaration* EOF - ; - -packageDeclaration - : packageModifier* 'package' Identifier ('.' Identifier)* ';' - ; - -packageModifier - : annotation - ; - -importDeclaration - : singleTypeImportDeclaration - | typeImportOnDemandDeclaration - | singleStaticImportDeclaration - | staticImportOnDemandDeclaration - ; - -singleTypeImportDeclaration - : 'import' typeName ';' - ; - -typeImportOnDemandDeclaration - : 'import' packageOrTypeName '.' '*' ';' - ; - -singleStaticImportDeclaration - : 'import' 'static' typeName '.' Identifier ';' - ; - -staticImportOnDemandDeclaration - : 'import' 'static' typeName '.' '*' ';' - ; - -typeDeclaration - : classDeclaration - | interfaceDeclaration - | ';' - ; - -/* - * Productions from §8 (Classes) - */ - -classDeclaration - : normalClassDeclaration - | enumDeclaration - ; - -normalClassDeclaration - : classModifier* 'class' Identifier typeParameters? superclass? superinterfaces? classBody - ; - -classModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'abstract' - | 'static' - | 'final' - | 'strictfp' - ; - -typeParameters - : '<' typeParameterList '>' - ; - -typeParameterList - : typeParameter (',' typeParameter)* - ; - -superclass - : 'extends' classType - ; - -superinterfaces - : 'implements' interfaceTypeList - ; - -interfaceTypeList - : interfaceType (',' interfaceType)* - ; - -classBody - : '{' classBodyDeclaration* '}' - ; - -classBodyDeclaration - : classMemberDeclaration - | instanceInitializer - | staticInitializer - | constructorDeclaration - ; - -classMemberDeclaration - : fieldDeclaration - | methodDeclaration - | classDeclaration - | interfaceDeclaration - | ';' - ; - -fieldDeclaration - : fieldModifier* unannType variableDeclaratorList ';' - ; - -fieldModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'static' - | 'final' - | 'transient' - | 'volatile' - ; - -variableDeclaratorList - : variableDeclarator (',' variableDeclarator)* - ; - -variableDeclarator - : variableDeclaratorId ('=' variableInitializer)? - ; - -variableDeclaratorId - : Identifier dims? - ; - -variableInitializer - : expression - | arrayInitializer - ; - -unannType - : unannPrimitiveType - | unannReferenceType - ; - -unannPrimitiveType - : numericType - | 'boolean' - ; - -unannReferenceType - : unannClassOrInterfaceType - | unannTypeVariable - | unannArrayType - ; - -unannClassOrInterfaceType - : ( unannClassType_lfno_unannClassOrInterfaceType - | unannInterfaceType_lfno_unannClassOrInterfaceType - ) - ( unannClassType_lf_unannClassOrInterfaceType - | unannInterfaceType_lf_unannClassOrInterfaceType - )* - ; - -unannClassType - : Identifier typeArguments? - | unannClassOrInterfaceType '.' annotation* Identifier typeArguments? - ; - -unannClassType_lf_unannClassOrInterfaceType - : '.' annotation* Identifier typeArguments? - ; - -unannClassType_lfno_unannClassOrInterfaceType - : Identifier typeArguments? - ; - -unannInterfaceType - : unannClassType - ; - -unannInterfaceType_lf_unannClassOrInterfaceType - : unannClassType_lf_unannClassOrInterfaceType - ; - -unannInterfaceType_lfno_unannClassOrInterfaceType - : unannClassType_lfno_unannClassOrInterfaceType - ; - -unannTypeVariable - : Identifier - ; - -unannArrayType - : unannPrimitiveType dims - | unannClassOrInterfaceType dims - | unannTypeVariable dims - ; - -methodDeclaration - : methodModifier* methodHeader methodBody - ; - -methodModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'abstract' - | 'static' - | 'final' - | 'synchronized' - | 'native' - | 'strictfp' - ; - -methodHeader - : result methodDeclarator throws_? - | typeParameters annotation* result methodDeclarator throws_? - ; - -result - : unannType - | 'void' - ; - -methodDeclarator - : Identifier '(' formalParameterList? ')' dims? - ; - -formalParameterList - : formalParameters ',' lastFormalParameter - | lastFormalParameter - ; - -formalParameters - : formalParameter (',' formalParameter)* - | receiverParameter (',' formalParameter)* - ; - -formalParameter - : variableModifier* unannType variableDeclaratorId - ; - -variableModifier - : annotation - | 'final' - ; - -lastFormalParameter - : variableModifier* unannType annotation* '...' variableDeclaratorId - | formalParameter - ; - -receiverParameter - : annotation* unannType (Identifier '.')? 'this' - ; - -throws_ - : 'throws' exceptionTypeList - ; - -exceptionTypeList - : exceptionType (',' exceptionType)* - ; - -exceptionType - : classType - | typeVariable - ; - -methodBody - : block - | ';' - ; - -instanceInitializer - : block - ; - -staticInitializer - : 'static' block - ; - -constructorDeclaration - : constructorModifier* constructorDeclarator throws_? constructorBody - ; - -constructorModifier - : annotation - | 'public' - | 'protected' - | 'private' - ; - -constructorDeclarator - : typeParameters? simpleTypeName '(' formalParameterList? ')' - ; - -simpleTypeName - : Identifier - ; - -constructorBody - : '{' explicitConstructorInvocation? blockStatements? '}' - ; - -explicitConstructorInvocation - : typeArguments? 'this' '(' argumentList? ')' ';' - | typeArguments? 'super' '(' argumentList? ')' ';' - | expressionName '.' typeArguments? 'super' '(' argumentList? ')' ';' - | primary '.' typeArguments? 'super' '(' argumentList? ')' ';' - ; - -enumDeclaration - : classModifier* 'enum' Identifier superinterfaces? enumBody - ; - -enumBody - : '{' enumConstantList? ','? enumBodyDeclarations? '}' - ; - -enumConstantList - : enumConstant (',' enumConstant)* - ; - -enumConstant - : enumConstantModifier* Identifier ('(' argumentList? ')')? classBody? - ; - -enumConstantModifier - : annotation - ; - -enumBodyDeclarations - : ';' classBodyDeclaration* - ; - -/* - * Productions from §9 (Interfaces) - */ - -interfaceDeclaration - : normalInterfaceDeclaration - | annotationTypeDeclaration - ; - -normalInterfaceDeclaration - : interfaceModifier* 'interface' Identifier typeParameters? extendsInterfaces? interfaceBody - ; - -interfaceModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'abstract' - | 'static' - | 'strictfp' - ; - -extendsInterfaces - : 'extends' interfaceTypeList - ; - -interfaceBody - : '{' interfaceMemberDeclaration* '}' - ; - -interfaceMemberDeclaration - : constantDeclaration - | interfaceMethodDeclaration - | classDeclaration - | interfaceDeclaration - | ';' - ; - -constantDeclaration - : constantModifier* unannType variableDeclaratorList ';' - ; - -constantModifier - : annotation - | 'public' - | 'static' - | 'final' - ; - -interfaceMethodDeclaration - : interfaceMethodModifier* methodHeader methodBody - ; - -interfaceMethodModifier - : annotation - | 'public' - | 'abstract' - | 'default' - | 'static' - | 'strictfp' - ; - -annotationTypeDeclaration - : interfaceModifier* '@' 'interface' Identifier annotationTypeBody - ; - -annotationTypeBody - : '{' annotationTypeMemberDeclaration* '}' - ; - -annotationTypeMemberDeclaration - : annotationTypeElementDeclaration - | constantDeclaration - | classDeclaration - | interfaceDeclaration - | ';' - ; - -annotationTypeElementDeclaration - : annotationTypeElementModifier* unannType Identifier '(' ')' dims? defaultValue? ';' - ; - -annotationTypeElementModifier - : annotation - | 'public' - | 'abstract' - ; - -defaultValue - : 'default' elementValue - ; - -annotation - : normalAnnotation - | markerAnnotation - | singleElementAnnotation - ; - -normalAnnotation - : '@' typeName '(' elementValuePairList? ')' - ; - -elementValuePairList - : elementValuePair (',' elementValuePair)* - ; - -elementValuePair - : Identifier '=' elementValue - ; - -elementValue - : conditionalExpression - | elementValueArrayInitializer - | annotation - ; - -elementValueArrayInitializer - : '{' elementValueList? ','? '}' - ; - -elementValueList - : elementValue (',' elementValue)* - ; - -markerAnnotation - : '@' typeName - ; - -singleElementAnnotation - : '@' typeName '(' elementValue ')' - ; - -/* - * Productions from §10 (Arrays) - */ - -arrayInitializer - : '{' variableInitializerList? ','? '}' - ; - -variableInitializerList - : variableInitializer (',' variableInitializer)* - ; - -/* - * Productions from §14 (Blocks and Statements) - */ - -block - : '{' blockStatements? '}' - ; - -blockStatements - : blockStatement blockStatement* - ; - -blockStatement - : localVariableDeclarationStatement - | classDeclaration - | statement - ; - -localVariableDeclarationStatement - : localVariableDeclaration ';' - ; - -localVariableDeclaration - : variableModifier* unannType variableDeclaratorList - ; - -statement - : statementWithoutTrailingSubstatement - | labeledStatement - | ifThenStatement - | ifThenElseStatement - | whileStatement - | forStatement - ; - -statementNoShortIf - : statementWithoutTrailingSubstatement - | labeledStatementNoShortIf - | ifThenElseStatementNoShortIf - | whileStatementNoShortIf - | forStatementNoShortIf - ; - -statementWithoutTrailingSubstatement - : block - | emptyStatement - | expressionStatement - | assertStatement - | switchStatement - | doStatement - | breakStatement - | continueStatement - | returnStatement - | synchronizedStatement - | throwStatement - | tryStatement - ; - -emptyStatement - : ';' - ; - -labeledStatement - : Identifier ':' statement - ; - -labeledStatementNoShortIf - : Identifier ':' statementNoShortIf - ; - -expressionStatement - : statementExpression ';' - ; - -statementExpression - : assignment - | preIncrementExpression - | preDecrementExpression - | postIncrementExpression - | postDecrementExpression - | methodInvocation - | classInstanceCreationExpression - ; - -ifThenStatement - : 'if' '(' expression ')' statement - ; - -ifThenElseStatement - : 'if' '(' expression ')' statementNoShortIf 'else' statement - ; - -ifThenElseStatementNoShortIf - : 'if' '(' expression ')' statementNoShortIf 'else' statementNoShortIf - ; - -assertStatement - : 'assert' expression ';' - | 'assert' expression ':' expression ';' - ; - -switchStatement - : 'switch' '(' expression ')' switchBlock - ; - -switchBlock - : '{' switchBlockStatementGroup* switchLabel* '}' - ; - -switchBlockStatementGroup - : switchLabels blockStatements - ; - -switchLabels - : switchLabel switchLabel* - ; - -switchLabel - : 'case' constantExpression ':' - | 'case' enumConstantName ':' - | 'default' ':' - ; - -enumConstantName - : Identifier - ; - -whileStatement - : 'while' '(' expression ')' statement - ; - -whileStatementNoShortIf - : 'while' '(' expression ')' statementNoShortIf - ; - -doStatement - : 'do' statement 'while' '(' expression ')' ';' - ; - -forStatement - : basicForStatement - | enhancedForStatement - ; - -forStatementNoShortIf - : basicForStatementNoShortIf - | enhancedForStatementNoShortIf - ; - -basicForStatement - : 'for' '(' forInit? ';' expression? ';' forUpdate? ')' statement - ; - -basicForStatementNoShortIf - : 'for' '(' forInit? ';' expression? ';' forUpdate? ')' statementNoShortIf - ; - -forInit - : statementExpressionList - | localVariableDeclaration - ; - -forUpdate - : statementExpressionList - ; - -statementExpressionList - : statementExpression (',' statementExpression)* - ; - -enhancedForStatement - : 'for' '(' variableModifier* unannType variableDeclaratorId ':' expression ')' statement - ; - -enhancedForStatementNoShortIf - : 'for' '(' variableModifier* unannType variableDeclaratorId ':' expression ')' statementNoShortIf - ; - -breakStatement - : 'break' Identifier? ';' - ; - -continueStatement - : 'continue' Identifier? ';' - ; - -returnStatement - : 'return' expression? ';' - ; - -throwStatement - : 'throw' expression ';' - ; - -synchronizedStatement - : 'synchronized' '(' expression ')' block - ; - -tryStatement - : 'try' block catches - | 'try' block catches? finally_ - | tryWithResourcesStatement - ; - -catches - : catchClause catchClause* - ; - -catchClause - : 'catch' '(' catchFormalParameter ')' block - ; - -catchFormalParameter - : variableModifier* catchType variableDeclaratorId - ; - -catchType - : unannClassType ('|' classType)* - ; - -finally_ - : 'finally' block - ; - -tryWithResourcesStatement - : 'try' resourceSpecification block catches? finally_? - ; - -resourceSpecification - : '(' resourceList ';'? ')' - ; - -resourceList - : resource (';' resource)* - ; - -resource - : variableModifier* unannType variableDeclaratorId '=' expression - ; - -/* - * Productions from §15 (Expressions) - */ - -primary - : ( primaryNoNewArray_lfno_primary - | arrayCreationExpression - ) - ( primaryNoNewArray_lf_primary - )* - ; - -primaryNoNewArray - : literal - | typeName ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression - | fieldAccess - | arrayAccess - | methodInvocation - | methodReference - ; - -primaryNoNewArray_lf_arrayAccess - : - ; - -primaryNoNewArray_lfno_arrayAccess - : literal - | typeName ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression - | fieldAccess - | methodInvocation - | methodReference - ; - -primaryNoNewArray_lf_primary - : classInstanceCreationExpression_lf_primary - | fieldAccess_lf_primary - | arrayAccess_lf_primary - | methodInvocation_lf_primary - | methodReference_lf_primary - ; - -primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary - : - ; - -primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary - : classInstanceCreationExpression_lf_primary - | fieldAccess_lf_primary - | methodInvocation_lf_primary - | methodReference_lf_primary - ; - -primaryNoNewArray_lfno_primary - : literal - | typeName ('[' ']')* '.' 'class' - | unannPrimitiveType ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression_lfno_primary - | fieldAccess_lfno_primary - | arrayAccess_lfno_primary - | methodInvocation_lfno_primary - | methodReference_lfno_primary - ; - -primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary - : - ; - -primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary - : literal - | typeName ('[' ']')* '.' 'class' - | unannPrimitiveType ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression_lfno_primary - | fieldAccess_lfno_primary - | methodInvocation_lfno_primary - | methodReference_lfno_primary - ; - -classInstanceCreationExpression - : 'new' typeArguments? annotation* Identifier ('.' annotation* Identifier)* typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - | expressionName '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - | primary '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - ; - -classInstanceCreationExpression_lf_primary - : '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - ; - -classInstanceCreationExpression_lfno_primary - : 'new' typeArguments? annotation* Identifier ('.' annotation* Identifier)* typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - | expressionName '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - ; - -typeArgumentsOrDiamond - : typeArguments - | '<' '>' - ; - -fieldAccess - : primary '.' Identifier - | 'super' '.' Identifier - | typeName '.' 'super' '.' Identifier - ; - -fieldAccess_lf_primary - : '.' Identifier - ; - -fieldAccess_lfno_primary - : 'super' '.' Identifier - | typeName '.' 'super' '.' Identifier - ; - -arrayAccess - : ( expressionName '[' expression ']' - | primaryNoNewArray_lfno_arrayAccess '[' expression ']' - ) - ( primaryNoNewArray_lf_arrayAccess '[' expression ']' - )* - ; - -arrayAccess_lf_primary - : ( primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary '[' expression ']' - ) - ( primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary '[' expression ']' - )* - ; - -arrayAccess_lfno_primary - : ( expressionName '[' expression ']' - | primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary '[' expression ']' - ) - ( primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary '[' expression ']' - )* - ; - -methodInvocation - : methodName '(' argumentList? ')' - | typeName '.' typeArguments? Identifier '(' argumentList? ')' - | expressionName '.' typeArguments? Identifier '(' argumentList? ')' - | primary '.' typeArguments? Identifier '(' argumentList? ')' - | 'super' '.' typeArguments? Identifier '(' argumentList? ')' - | typeName '.' 'super' '.' typeArguments? Identifier '(' argumentList? ')' - ; - -methodInvocation_lf_primary - : '.' typeArguments? Identifier '(' argumentList? ')' - ; - -methodInvocation_lfno_primary - : methodName '(' argumentList? ')' - | typeName '.' typeArguments? Identifier '(' argumentList? ')' - | expressionName '.' typeArguments? Identifier '(' argumentList? ')' - | 'super' '.' typeArguments? Identifier '(' argumentList? ')' - | typeName '.' 'super' '.' typeArguments? Identifier '(' argumentList? ')' - ; - -argumentList - : expression (',' expression)* - ; - -methodReference - : expressionName '::' typeArguments? Identifier - | referenceType '::' typeArguments? Identifier - | primary '::' typeArguments? Identifier - | 'super' '::' typeArguments? Identifier - | typeName '.' 'super' '::' typeArguments? Identifier - | classType '::' typeArguments? 'new' - | arrayType '::' 'new' - ; - -methodReference_lf_primary - : '::' typeArguments? Identifier - ; - -methodReference_lfno_primary - : expressionName '::' typeArguments? Identifier - | referenceType '::' typeArguments? Identifier - | 'super' '::' typeArguments? Identifier - | typeName '.' 'super' '::' typeArguments? Identifier - | classType '::' typeArguments? 'new' - | arrayType '::' 'new' - ; - -arrayCreationExpression - : 'new' primitiveType dimExprs dims? - | 'new' classOrInterfaceType dimExprs dims? - | 'new' primitiveType dims arrayInitializer - | 'new' classOrInterfaceType dims arrayInitializer - ; - -dimExprs - : dimExpr dimExpr* - ; - -dimExpr - : annotation* '[' expression ']' - ; - -constantExpression - : expression - ; - -expression - : lambdaExpression - | assignmentExpression - ; - -lambdaExpression - : lambdaParameters '->' lambdaBody - ; - -lambdaParameters - : Identifier - | '(' formalParameterList? ')' - | '(' inferredFormalParameterList ')' - ; - -inferredFormalParameterList - : Identifier (',' Identifier)* - ; - -lambdaBody - : expression - | block - ; - -assignmentExpression - : conditionalExpression - | assignment - ; - -assignment - : leftHandSide assignmentOperator expression - ; - -leftHandSide - : expressionName - | fieldAccess - | arrayAccess - ; - -assignmentOperator - : '=' - | '*=' - | '/=' - | '%=' - | '+=' - | '-=' - | '<<=' - | '>>=' - | '>>>=' - | '&=' - | '^=' - | '|=' - ; - -conditionalExpression - : conditionalOrExpression - | conditionalOrExpression '?' expression ':' conditionalExpression - ; - -conditionalOrExpression - : conditionalAndExpression - | conditionalOrExpression '||' conditionalAndExpression - ; - -conditionalAndExpression - : inclusiveOrExpression - | conditionalAndExpression '&&' inclusiveOrExpression - ; - -inclusiveOrExpression - : exclusiveOrExpression - | inclusiveOrExpression '|' exclusiveOrExpression - ; - -exclusiveOrExpression - : andExpression - | exclusiveOrExpression '^' andExpression - ; - -andExpression - : equalityExpression - | andExpression '&' equalityExpression - ; - -equalityExpression - : relationalExpression - | equalityExpression '==' relationalExpression - | equalityExpression '!=' relationalExpression - ; - -relationalExpression - : shiftExpression - | relationalExpression '<' shiftExpression - | relationalExpression '>' shiftExpression - | relationalExpression '<=' shiftExpression - | relationalExpression '>=' shiftExpression - | relationalExpression 'instanceof' referenceType - ; - -shiftExpression - : additiveExpression - | shiftExpression '<' '<' additiveExpression - | shiftExpression '>' '>' additiveExpression - | shiftExpression '>' '>' '>' additiveExpression - ; - -additiveExpression - : multiplicativeExpression - | additiveExpression '+' multiplicativeExpression - | additiveExpression '-' multiplicativeExpression - ; - -multiplicativeExpression - : unaryExpression - | multiplicativeExpression '*' unaryExpression - | multiplicativeExpression '/' unaryExpression - | multiplicativeExpression '%' unaryExpression - ; - -unaryExpression - : preIncrementExpression - | preDecrementExpression - | '+' unaryExpression - | '-' unaryExpression - | unaryExpressionNotPlusMinus - ; - -preIncrementExpression - : '++' unaryExpression - ; - -preDecrementExpression - : '--' unaryExpression - ; - -unaryExpressionNotPlusMinus - : postfixExpression - | '~' unaryExpression - | '!' unaryExpression - | castExpression - ; - -postfixExpression - : ( primary - | expressionName - ) - ( postIncrementExpression_lf_postfixExpression - | postDecrementExpression_lf_postfixExpression - )* - ; - -postIncrementExpression - : postfixExpression '++' - ; - -postIncrementExpression_lf_postfixExpression - : '++' - ; - -postDecrementExpression - : postfixExpression '--' - ; - -postDecrementExpression_lf_postfixExpression - : '--' - ; - -castExpression - : '(' primitiveType ')' unaryExpression - | '(' referenceType additionalBound* ')' unaryExpressionNotPlusMinus - | '(' referenceType additionalBound* ')' lambdaExpression - ; - -// LEXER - -// §3.9 Keywords - -ABSTRACT : 'abstract'; -ASSERT : 'assert'; -BOOLEAN : 'boolean'; -BREAK : 'break'; -BYTE : 'byte'; -CASE : 'case'; -CATCH : 'catch'; -CHAR : 'char'; -CLASS : 'class'; -CONST : 'const'; -CONTINUE : 'continue'; -DEFAULT : 'default'; -DO : 'do'; -DOUBLE : 'double'; -ELSE : 'else'; -ENUM : 'enum'; -EXTENDS : 'extends'; -FINAL : 'final'; -FINALLY : 'finally'; -FLOAT : 'float'; -FOR : 'for'; -IF : 'if'; -GOTO : 'goto'; -IMPLEMENTS : 'implements'; -IMPORT : 'import'; -INSTANCEOF : 'instanceof'; -INT : 'int'; -INTERFACE : 'interface'; -LONG : 'long'; -NATIVE : 'native'; -NEW : 'new'; -PACKAGE : 'package'; -PRIVATE : 'private'; -PROTECTED : 'protected'; -PUBLIC : 'public'; -RETURN : 'return'; -SHORT : 'short'; -STATIC : 'static'; -STRICTFP : 'strictfp'; -SUPER : 'super'; -SWITCH : 'switch'; -SYNCHRONIZED : 'synchronized'; -THIS : 'this'; -THROW : 'throw'; -THROWS : 'throws'; -TRANSIENT : 'transient'; -TRY : 'try'; -VOID : 'void'; -VOLATILE : 'volatile'; -WHILE : 'while'; - -// §3.10.1 Integer Literals - -IntegerLiteral - : DecimalIntegerLiteral - | HexIntegerLiteral - | OctalIntegerLiteral - | BinaryIntegerLiteral - ; - -fragment -DecimalIntegerLiteral - : DecimalNumeral IntegerTypeSuffix? - ; - -fragment -HexIntegerLiteral - : HexNumeral IntegerTypeSuffix? - ; - -fragment -OctalIntegerLiteral - : OctalNumeral IntegerTypeSuffix? - ; - -fragment -BinaryIntegerLiteral - : BinaryNumeral IntegerTypeSuffix? - ; - -fragment -IntegerTypeSuffix - : [lL] - ; - -fragment -DecimalNumeral - : '0' - | NonZeroDigit (Digits? | Underscores Digits) - ; - -fragment -Digits - : Digit (DigitsAndUnderscores? Digit)? - ; - -fragment -Digit - : '0' - | NonZeroDigit - ; - -fragment -NonZeroDigit - : [1-9] - ; - -fragment -DigitsAndUnderscores - : DigitOrUnderscore+ - ; - -fragment -DigitOrUnderscore - : Digit - | '_' - ; - -fragment -Underscores - : '_'+ - ; - -fragment -HexNumeral - : '0' [xX] HexDigits - ; - -fragment -HexDigits - : HexDigit (HexDigitsAndUnderscores? HexDigit)? - ; - -fragment -HexDigit - : [0-9a-fA-F] - ; - -fragment -HexDigitsAndUnderscores - : HexDigitOrUnderscore+ - ; - -fragment -HexDigitOrUnderscore - : HexDigit - | '_' - ; - -fragment -OctalNumeral - : '0' Underscores? OctalDigits - ; - -fragment -OctalDigits - : OctalDigit (OctalDigitsAndUnderscores? OctalDigit)? - ; - -fragment -OctalDigit - : [0-7] - ; - -fragment -OctalDigitsAndUnderscores - : OctalDigitOrUnderscore+ - ; - -fragment -OctalDigitOrUnderscore - : OctalDigit - | '_' - ; - -fragment -BinaryNumeral - : '0' [bB] BinaryDigits - ; - -fragment -BinaryDigits - : BinaryDigit (BinaryDigitsAndUnderscores? BinaryDigit)? - ; - -fragment -BinaryDigit - : [01] - ; - -fragment -BinaryDigitsAndUnderscores - : BinaryDigitOrUnderscore+ - ; - -fragment -BinaryDigitOrUnderscore - : BinaryDigit - | '_' - ; - -// §3.10.2 Floating-Point Literals - -FloatingPointLiteral - : DecimalFloatingPointLiteral - | HexadecimalFloatingPointLiteral - ; - -fragment -DecimalFloatingPointLiteral - : Digits '.' Digits? ExponentPart? FloatTypeSuffix? - | '.' Digits ExponentPart? FloatTypeSuffix? - | Digits ExponentPart FloatTypeSuffix? - | Digits FloatTypeSuffix - ; - -fragment -ExponentPart - : ExponentIndicator SignedInteger - ; - -fragment -ExponentIndicator - : [eE] - ; - -fragment -SignedInteger - : Sign? Digits - ; - -fragment -Sign - : [+-] - ; - -fragment -FloatTypeSuffix - : [fFdD] - ; - -fragment -HexadecimalFloatingPointLiteral - : HexSignificand BinaryExponent FloatTypeSuffix? - ; - -fragment -HexSignificand - : HexNumeral '.'? - | '0' [xX] HexDigits? '.' HexDigits - ; - -fragment -BinaryExponent - : BinaryExponentIndicator SignedInteger - ; - -fragment -BinaryExponentIndicator - : [pP] - ; - -// §3.10.3 Boolean Literals - -BooleanLiteral - : 'true' - | 'false' - ; - -// §3.10.4 Character Literals - -CharacterLiteral - : '\'' SingleCharacter '\'' - | '\'' EscapeSequence '\'' - ; - -fragment -SingleCharacter - : ~['\\] - ; - -// §3.10.5 String Literals - -StringLiteral - : '"' StringCharacters? '"' - ; - -fragment -StringCharacters - : StringCharacter+ - ; - -fragment -StringCharacter - : ~["\\] - | EscapeSequence - ; - -// §3.10.6 Escape Sequences for Character and String Literals - -fragment -EscapeSequence - : '\\' [btnfr"'\\] - | OctalEscape - | UnicodeEscape // This is not in the spec but prevents having to preprocess the input - ; - -fragment -OctalEscape - : '\\' OctalDigit - | '\\' OctalDigit OctalDigit - | '\\' ZeroToThree OctalDigit OctalDigit - ; - -fragment -ZeroToThree - : [0-3] - ; - -// This is not in the spec but prevents having to preprocess the input -fragment -UnicodeEscape - : '\\' 'u' HexDigit HexDigit HexDigit HexDigit - ; - -// §3.10.7 The Null Literal - -NullLiteral - : 'null' - ; - -// §3.11 Separators - -LPAREN : '('; -RPAREN : ')'; -LBRACE : '{'; -RBRACE : '}'; -LBRACK : '['; -RBRACK : ']'; -SEMI : ';'; -COMMA : ','; -DOT : '.'; - -// §3.12 Operators - -ASSIGN : '='; -GT : '>'; -LT : '<'; -BANG : '!'; -TILDE : '~'; -QUESTION : '?'; -COLON : ':'; -EQUAL : '=='; -LE : '<='; -GE : '>='; -NOTEQUAL : '!='; -AND : '&&'; -OR : '||'; -INC : '++'; -DEC : '--'; -ADD : '+'; -SUB : '-'; -MUL : '*'; -DIV : '/'; -BITAND : '&'; -BITOR : '|'; -CARET : '^'; -MOD : '%'; -ARROW : '->'; -COLONCOLON : '::'; - -ADD_ASSIGN : '+='; -SUB_ASSIGN : '-='; -MUL_ASSIGN : '*='; -DIV_ASSIGN : '/='; -AND_ASSIGN : '&='; -OR_ASSIGN : '|='; -XOR_ASSIGN : '^='; -MOD_ASSIGN : '%='; -LSHIFT_ASSIGN : '<<='; -RSHIFT_ASSIGN : '>>='; -URSHIFT_ASSIGN : '>>>='; - -// §3.8 Identifiers (must appear after all keywords in the grammar) - -Identifier - : JavaLetter JavaLetterOrDigit* - ; - -fragment -JavaLetter - : [a-zA-Z$_] // these are the "java letters" below 0x7F - | // covers all characters above 0x7F which are not a surrogate - ~[\u0000-\u007F\uD800-\uDBFF] - {Character.isJavaIdentifierStart(_input.LA(-1))}? - | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF - [\uD800-\uDBFF] [\uDC00-\uDFFF] - {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? - ; - -fragment -JavaLetterOrDigit - : [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F - | // covers all characters above 0x7F which are not a surrogate - ~[\u0000-\u007F\uD800-\uDBFF] - {Character.isJavaIdentifierPart(_input.LA(-1))}? - | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF - [\uD800-\uDBFF] [\uDC00-\uDFFF] - {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? - ; - -// -// Additional symbols not defined in the lexical specification -// - -AT : '@'; -ELLIPSIS : '...'; - -// -// Whitespace and comments -// - -WS : [ \t\r\n\u000C]+ -> channel(HIDDEN) - ; - -COMMENT - : '/*' .*? '*/' -> channel(HIDDEN) - ; - -LINE_COMMENT - : '//' ~[\r\n]* -> channel(HIDDEN) - ; diff --git a/jcommon/antlr/src/main/resources/antlr/java8/Java8Lexer.g4 b/jcommon/antlr/src/main/resources/antlr/java8/Java8Lexer.g4 deleted file mode 100644 index 2e6541f86..000000000 --- a/jcommon/antlr/src/main/resources/antlr/java8/Java8Lexer.g4 +++ /dev/null @@ -1,1126 +0,0 @@ -/* - * [The "BSD license"] - * Copyright (c) 2014 Terence Parr - * Copyright (c) 2014 Sam Harwell - * Copyright (c) 2019 Student Main (Make it universal) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * A Java 8 grammar for ANTLR 4 derived from the Java Language Specification - * chapter 19. - * - * NOTE: This grammar results in a generated parser that is much slower - * than the Java 7 grammar in the grammars-v4/java directory. This - * one is, however, extremely close to the spec. - * - * You can test with - * - * $ antlr4 Java8.g4 - * $ javac *.java - * $ grun Java8 compilationUnit *.java - * - * Or, -~/antlr/code/grammars-v4/java8 $ java Test . -/Users/parrt/antlr/code/grammars-v4/java8/./Java8BaseListener.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Lexer.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Listener.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Parser.java -/Users/parrt/antlr/code/grammars-v4/java8/./Test.java -Total lexer+parser time 30844ms. - */ -lexer grammar Java8Lexer; - -// LEXER - -// §3.9 Keywords - -ABSTRACT : 'abstract'; -ASSERT : 'assert'; -BOOLEAN : 'boolean'; -BREAK : 'break'; -BYTE : 'byte'; -CASE : 'case'; -CATCH : 'catch'; -CHAR : 'char'; -CLASS : 'class'; -CONST : 'const'; -CONTINUE : 'continue'; -DEFAULT : 'default'; -DO : 'do'; -DOUBLE : 'double'; -ELSE : 'else'; -ENUM : 'enum'; -EXTENDS : 'extends'; -FINAL : 'final'; -FINALLY : 'finally'; -FLOAT : 'float'; -FOR : 'for'; -IF : 'if'; -GOTO : 'goto'; -IMPLEMENTS : 'implements'; -IMPORT : 'import'; -INSTANCEOF : 'instanceof'; -INT : 'int'; -INTERFACE : 'interface'; -LONG : 'long'; -NATIVE : 'native'; -NEW : 'new'; -PACKAGE : 'package'; -PRIVATE : 'private'; -PROTECTED : 'protected'; -PUBLIC : 'public'; -RETURN : 'return'; -SHORT : 'short'; -STATIC : 'static'; -STRICTFP : 'strictfp'; -SUPER : 'super'; -SWITCH : 'switch'; -SYNCHRONIZED : 'synchronized'; -THIS : 'this'; -THROW : 'throw'; -THROWS : 'throws'; -TRANSIENT : 'transient'; -TRY : 'try'; -VOID : 'void'; -VOLATILE : 'volatile'; -WHILE : 'while'; - -// §3.10.1 Integer Literals - -IntegerLiteral - : DecimalIntegerLiteral - | HexIntegerLiteral - | OctalIntegerLiteral - | BinaryIntegerLiteral - ; - -fragment -DecimalIntegerLiteral - : DecimalNumeral IntegerTypeSuffix? - ; - -fragment -HexIntegerLiteral - : HexNumeral IntegerTypeSuffix? - ; - -fragment -OctalIntegerLiteral - : OctalNumeral IntegerTypeSuffix? - ; - -fragment -BinaryIntegerLiteral - : BinaryNumeral IntegerTypeSuffix? - ; - -fragment -IntegerTypeSuffix - : [lL] - ; - -fragment -DecimalNumeral - : '0' - | NonZeroDigit (Digits? | Underscores Digits) - ; - -fragment -Digits - : Digit (DigitsAndUnderscores? Digit)? - ; - -fragment -Digit - : '0' - | NonZeroDigit - ; - -fragment -NonZeroDigit - : [1-9] - ; - -fragment -DigitsAndUnderscores - : DigitOrUnderscore+ - ; - -fragment -DigitOrUnderscore - : Digit - | '_' - ; - -fragment -Underscores - : '_'+ - ; - -fragment -HexNumeral - : '0' [xX] HexDigits - ; - -fragment -HexDigits - : HexDigit (HexDigitsAndUnderscores? HexDigit)? - ; - -fragment -HexDigit - : [0-9a-fA-F] - ; - -fragment -HexDigitsAndUnderscores - : HexDigitOrUnderscore+ - ; - -fragment -HexDigitOrUnderscore - : HexDigit - | '_' - ; - -fragment -OctalNumeral - : '0' Underscores? OctalDigits - ; - -fragment -OctalDigits - : OctalDigit (OctalDigitsAndUnderscores? OctalDigit)? - ; - -fragment -OctalDigit - : [0-7] - ; - -fragment -OctalDigitsAndUnderscores - : OctalDigitOrUnderscore+ - ; - -fragment -OctalDigitOrUnderscore - : OctalDigit - | '_' - ; - -fragment -BinaryNumeral - : '0' [bB] BinaryDigits - ; - -fragment -BinaryDigits - : BinaryDigit (BinaryDigitsAndUnderscores? BinaryDigit)? - ; - -fragment -BinaryDigit - : [01] - ; - -fragment -BinaryDigitsAndUnderscores - : BinaryDigitOrUnderscore+ - ; - -fragment -BinaryDigitOrUnderscore - : BinaryDigit - | '_' - ; - -// §3.10.2 Floating-Point Literals - -FloatingPointLiteral - : DecimalFloatingPointLiteral - | HexadecimalFloatingPointLiteral - ; - -fragment -DecimalFloatingPointLiteral - : Digits '.' Digits? ExponentPart? FloatTypeSuffix? - | '.' Digits ExponentPart? FloatTypeSuffix? - | Digits ExponentPart FloatTypeSuffix? - | Digits FloatTypeSuffix - ; - -fragment -ExponentPart - : ExponentIndicator SignedInteger - ; - -fragment -ExponentIndicator - : [eE] - ; - -fragment -SignedInteger - : Sign? Digits - ; - -fragment -Sign - : [+-] - ; - -fragment -FloatTypeSuffix - : [fFdD] - ; - -fragment -HexadecimalFloatingPointLiteral - : HexSignificand BinaryExponent FloatTypeSuffix? - ; - -fragment -HexSignificand - : HexNumeral '.'? - | '0' [xX] HexDigits? '.' HexDigits - ; - -fragment -BinaryExponent - : BinaryExponentIndicator SignedInteger - ; - -fragment -BinaryExponentIndicator - : [pP] - ; - -// §3.10.3 Boolean Literals - -BooleanLiteral - : 'true' - | 'false' - ; - -// §3.10.4 Character Literals - -CharacterLiteral - : '\'' SingleCharacter '\'' - | '\'' EscapeSequence '\'' - ; - -fragment -SingleCharacter - : ~['\\\r\n] - ; - -// §3.10.5 String Literals - -StringLiteral - : '"' StringCharacters? '"' - ; - -fragment -StringCharacters - : StringCharacter+ - ; - -fragment -StringCharacter - : ~["\\\r\n] - | EscapeSequence - ; - -// §3.10.6 Escape Sequences for Character and String Literals - -fragment -EscapeSequence - : '\\' [btnfr"'\\] - | OctalEscape - | UnicodeEscape // This is not in the spec but prevents having to preprocess the input - ; - -fragment -OctalEscape - : '\\' OctalDigit - | '\\' OctalDigit OctalDigit - | '\\' ZeroToThree OctalDigit OctalDigit - ; - -fragment -ZeroToThree - : [0-3] - ; - -// This is not in the spec but prevents having to preprocess the input -fragment -UnicodeEscape - : '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit - ; - -// §3.10.7 The Null Literal - -NullLiteral - : 'null' - ; - -// §3.11 Separators - -LPAREN : '('; -RPAREN : ')'; -LBRACE : '{'; -RBRACE : '}'; -LBRACK : '['; -RBRACK : ']'; -SEMI : ';'; -COMMA : ','; -DOT : '.'; - -// §3.12 Operators - -ASSIGN : '='; -GT : '>'; -LT : '<'; -BANG : '!'; -TILDE : '~'; -QUESTION : '?'; -COLON : ':'; -EQUAL : '=='; -LE : '<='; -GE : '>='; -NOTEQUAL : '!='; -AND : '&&'; -OR : '||'; -INC : '++'; -DEC : '--'; -ADD : '+'; -SUB : '-'; -MUL : '*'; -DIV : '/'; -BITAND : '&'; -BITOR : '|'; -CARET : '^'; -MOD : '%'; -ARROW : '->'; -COLONCOLON : '::'; - -ADD_ASSIGN : '+='; -SUB_ASSIGN : '-='; -MUL_ASSIGN : '*='; -DIV_ASSIGN : '/='; -AND_ASSIGN : '&='; -OR_ASSIGN : '|='; -XOR_ASSIGN : '^='; -MOD_ASSIGN : '%='; -LSHIFT_ASSIGN : '<<='; -RSHIFT_ASSIGN : '>>='; -URSHIFT_ASSIGN : '>>>='; - -// §3.8 Identifiers (must appear after all keywords in the grammar) - -Identifier - : IdentifierStart IdentifierPart* - ; -/* -fragment -JavaLetter - : [a-zA-Z$_] // these are the "java letters" below 0x7F - | // covers all characters above 0x7F which are not a surrogate - ~[\u0000-\u007F\uD800-\uDBFF] {this.wasJavaIdentiferStart()}? - | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF - [\uD800-\uDBFF] [\uDC00-\uDFFF] {this.wasJavaIdentiferStartUTF16()}? - ; - -fragment -JavaLetterOrDigit - : [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F - | // covers all characters above 0x7F which are not a surrogate - ~[\u0000-\u007F\uD800-\uDBFF] {this.wasJavaIdentiferPart()}? - | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF - [\uD800-\uDBFF] [\uDC00-\uDFFF] {this.wasJavaIdentiferPartUTF16()}? - ;*/ - -// Dropped SMP support as ANTLR has no native support for it -fragment IdentifierStart - : [\u0024] - | [\u0041-\u005A] - | [\u005F] - | [\u0061-\u007A] - | [\u00A2-\u00A5] - | [\u00AA] - | [\u00B5] - | [\u00BA] - | [\u00C0-\u00D6] - | [\u00D8-\u00F6] - | [\u00F8-\u02C1] - | [\u02C6-\u02D1] - | [\u02E0-\u02E4] - | [\u02EC] - | [\u02EE] - | [\u0370-\u0374] - | [\u0376-\u0377] - | [\u037A-\u037D] - | [\u037F] - | [\u0386] - | [\u0388-\u038A] - | [\u038C] - | [\u038E-\u03A1] - | [\u03A3-\u03F5] - | [\u03F7-\u0481] - | [\u048A-\u052F] - | [\u0531-\u0556] - | [\u0559] - | [\u0561-\u0587] - | [\u058F] - | [\u05D0-\u05EA] - | [\u05F0-\u05F2] - | [\u060B] - | [\u0620-\u064A] - | [\u066E-\u066F] - | [\u0671-\u06D3] - | [\u06D5] - | [\u06E5-\u06E6] - | [\u06EE-\u06EF] - | [\u06FA-\u06FC] - | [\u06FF] - | [\u0710] - | [\u0712-\u072F] - | [\u074D-\u07A5] - | [\u07B1] - | [\u07CA-\u07EA] - | [\u07F4-\u07F5] - | [\u07FA] - | [\u0800-\u0815] - | [\u081A] - | [\u0824] - | [\u0828] - | [\u0840-\u0858] - | [\u0860-\u086A] - | [\u08A0-\u08B4] - | [\u08B6-\u08BD] - | [\u0904-\u0939] - | [\u093D] - | [\u0950] - | [\u0958-\u0961] - | [\u0971-\u0980] - | [\u0985-\u098C] - | [\u098F-\u0990] - | [\u0993-\u09A8] - | [\u09AA-\u09B0] - | [\u09B2] - | [\u09B6-\u09B9] - | [\u09BD] - | [\u09CE] - | [\u09DC-\u09DD] - | [\u09DF-\u09E1] - | [\u09F0-\u09F3] - | [\u09FB-\u09FC] - | [\u0A05-\u0A0A] - | [\u0A0F-\u0A10] - | [\u0A13-\u0A28] - | [\u0A2A-\u0A30] - | [\u0A32-\u0A33] - | [\u0A35-\u0A36] - | [\u0A38-\u0A39] - | [\u0A59-\u0A5C] - | [\u0A5E] - | [\u0A72-\u0A74] - | [\u0A85-\u0A8D] - | [\u0A8F-\u0A91] - | [\u0A93-\u0AA8] - | [\u0AAA-\u0AB0] - | [\u0AB2-\u0AB3] - | [\u0AB5-\u0AB9] - | [\u0ABD] - | [\u0AD0] - | [\u0AE0-\u0AE1] - | [\u0AF1] - | [\u0AF9] - | [\u0B05-\u0B0C] - | [\u0B0F-\u0B10] - | [\u0B13-\u0B28] - | [\u0B2A-\u0B30] - | [\u0B32-\u0B33] - | [\u0B35-\u0B39] - | [\u0B3D] - | [\u0B5C-\u0B5D] - | [\u0B5F-\u0B61] - | [\u0B71] - | [\u0B83] - | [\u0B85-\u0B8A] - | [\u0B8E-\u0B90] - | [\u0B92-\u0B95] - | [\u0B99-\u0B9A] - | [\u0B9C] - | [\u0B9E-\u0B9F] - | [\u0BA3-\u0BA4] - | [\u0BA8-\u0BAA] - | [\u0BAE-\u0BB9] - | [\u0BD0] - | [\u0BF9] - | [\u0C05-\u0C0C] - | [\u0C0E-\u0C10] - | [\u0C12-\u0C28] - | [\u0C2A-\u0C39] - | [\u0C3D] - | [\u0C58-\u0C5A] - | [\u0C60-\u0C61] - | [\u0C80] - | [\u0C85-\u0C8C] - | [\u0C8E-\u0C90] - | [\u0C92-\u0CA8] - | [\u0CAA-\u0CB3] - | [\u0CB5-\u0CB9] - | [\u0CBD] - | [\u0CDE] - | [\u0CE0-\u0CE1] - | [\u0CF1-\u0CF2] - | [\u0D05-\u0D0C] - | [\u0D0E-\u0D10] - | [\u0D12-\u0D3A] - | [\u0D3D] - | [\u0D4E] - | [\u0D54-\u0D56] - | [\u0D5F-\u0D61] - | [\u0D7A-\u0D7F] - | [\u0D85-\u0D96] - | [\u0D9A-\u0DB1] - | [\u0DB3-\u0DBB] - | [\u0DBD] - | [\u0DC0-\u0DC6] - | [\u0E01-\u0E30] - | [\u0E32-\u0E33] - | [\u0E3F-\u0E46] - | [\u0E81-\u0E82] - | [\u0E84] - | [\u0E87-\u0E88] - | [\u0E8A] - | [\u0E8D] - | [\u0E94-\u0E97] - | [\u0E99-\u0E9F] - | [\u0EA1-\u0EA3] - | [\u0EA5] - | [\u0EA7] - | [\u0EAA-\u0EAB] - | [\u0EAD-\u0EB0] - | [\u0EB2-\u0EB3] - | [\u0EBD] - | [\u0EC0-\u0EC4] - | [\u0EC6] - | [\u0EDC-\u0EDF] - | [\u0F00] - | [\u0F40-\u0F47] - | [\u0F49-\u0F6C] - | [\u0F88-\u0F8C] - | [\u1000-\u102A] - | [\u103F] - | [\u1050-\u1055] - | [\u105A-\u105D] - | [\u1061] - | [\u1065-\u1066] - | [\u106E-\u1070] - | [\u1075-\u1081] - | [\u108E] - | [\u10A0-\u10C5] - | [\u10C7] - | [\u10CD] - | [\u10D0-\u10FA] - | [\u10FC-\u1248] - | [\u124A-\u124D] - | [\u1250-\u1256] - | [\u1258] - | [\u125A-\u125D] - | [\u1260-\u1288] - | [\u128A-\u128D] - | [\u1290-\u12B0] - | [\u12B2-\u12B5] - | [\u12B8-\u12BE] - | [\u12C0] - | [\u12C2-\u12C5] - | [\u12C8-\u12D6] - | [\u12D8-\u1310] - | [\u1312-\u1315] - | [\u1318-\u135A] - | [\u1380-\u138F] - | [\u13A0-\u13F5] - | [\u13F8-\u13FD] - | [\u1401-\u166C] - | [\u166F-\u167F] - | [\u1681-\u169A] - | [\u16A0-\u16EA] - | [\u16EE-\u16F8] - | [\u1700-\u170C] - | [\u170E-\u1711] - | [\u1720-\u1731] - | [\u1740-\u1751] - | [\u1760-\u176C] - | [\u176E-\u1770] - | [\u1780-\u17B3] - | [\u17D7] - | [\u17DB-\u17DC] - | [\u1820-\u1877] - | [\u1880-\u1884] - | [\u1887-\u18A8] - | [\u18AA] - | [\u18B0-\u18F5] - | [\u1900-\u191E] - | [\u1950-\u196D] - | [\u1970-\u1974] - | [\u1980-\u19AB] - | [\u19B0-\u19C9] - | [\u1A00-\u1A16] - | [\u1A20-\u1A54] - | [\u1AA7] - | [\u1B05-\u1B33] - | [\u1B45-\u1B4B] - | [\u1B83-\u1BA0] - | [\u1BAE-\u1BAF] - | [\u1BBA-\u1BE5] - | [\u1C00-\u1C23] - | [\u1C4D-\u1C4F] - | [\u1C5A-\u1C7D] - | [\u1C80-\u1C88] - | [\u1CE9-\u1CEC] - | [\u1CEE-\u1CF1] - | [\u1CF5-\u1CF6] - | [\u1D00-\u1DBF] - | [\u1E00-\u1F15] - | [\u1F18-\u1F1D] - | [\u1F20-\u1F45] - | [\u1F48-\u1F4D] - | [\u1F50-\u1F57] - | [\u1F59] - | [\u1F5B] - | [\u1F5D] - | [\u1F5F-\u1F7D] - | [\u1F80-\u1FB4] - | [\u1FB6-\u1FBC] - | [\u1FBE] - | [\u1FC2-\u1FC4] - | [\u1FC6-\u1FCC] - | [\u1FD0-\u1FD3] - | [\u1FD6-\u1FDB] - | [\u1FE0-\u1FEC] - | [\u1FF2-\u1FF4] - | [\u1FF6-\u1FFC] - | [\u203F-\u2040] - | [\u2054] - | [\u2071] - | [\u207F] - | [\u2090-\u209C] - | [\u20A0-\u20BF] - | [\u2102] - | [\u2107] - | [\u210A-\u2113] - | [\u2115] - | [\u2119-\u211D] - | [\u2124] - | [\u2126] - | [\u2128] - | [\u212A-\u212D] - | [\u212F-\u2139] - | [\u213C-\u213F] - | [\u2145-\u2149] - | [\u214E] - | [\u2160-\u2188] - | [\u2C00-\u2C2E] - | [\u2C30-\u2C5E] - | [\u2C60-\u2CE4] - | [\u2CEB-\u2CEE] - | [\u2CF2-\u2CF3] - | [\u2D00-\u2D25] - | [\u2D27] - | [\u2D2D] - | [\u2D30-\u2D67] - | [\u2D6F] - | [\u2D80-\u2D96] - | [\u2DA0-\u2DA6] - | [\u2DA8-\u2DAE] - | [\u2DB0-\u2DB6] - | [\u2DB8-\u2DBE] - | [\u2DC0-\u2DC6] - | [\u2DC8-\u2DCE] - | [\u2DD0-\u2DD6] - | [\u2DD8-\u2DDE] - | [\u2E2F] - | [\u3005-\u3007] - | [\u3021-\u3029] - | [\u3031-\u3035] - | [\u3038-\u303C] - | [\u3041-\u3096] - | [\u309D-\u309F] - | [\u30A1-\u30FA] - | [\u30FC-\u30FF] - | [\u3105-\u312E] - | [\u3131-\u318E] - | [\u31A0-\u31BA] - | [\u31F0-\u31FF] - | [\u3400-\u4DB5] - | [\u4E00-\u9FEA] - | [\uA000-\uA48C] - | [\uA4D0-\uA4FD] - | [\uA500-\uA60C] - | [\uA610-\uA61F] - | [\uA62A-\uA62B] - | [\uA640-\uA66E] - | [\uA67F-\uA69D] - | [\uA6A0-\uA6EF] - | [\uA717-\uA71F] - | [\uA722-\uA788] - | [\uA78B-\uA7AE] - | [\uA7B0-\uA7B7] - | [\uA7F7-\uA801] - | [\uA803-\uA805] - | [\uA807-\uA80A] - | [\uA80C-\uA822] - | [\uA838] - | [\uA840-\uA873] - | [\uA882-\uA8B3] - | [\uA8F2-\uA8F7] - | [\uA8FB] - | [\uA8FD] - | [\uA90A-\uA925] - | [\uA930-\uA946] - | [\uA960-\uA97C] - | [\uA984-\uA9B2] - | [\uA9CF] - | [\uA9E0-\uA9E4] - | [\uA9E6-\uA9EF] - | [\uA9FA-\uA9FE] - | [\uAA00-\uAA28] - | [\uAA40-\uAA42] - | [\uAA44-\uAA4B] - | [\uAA60-\uAA76] - | [\uAA7A] - | [\uAA7E-\uAAAF] - | [\uAAB1] - | [\uAAB5-\uAAB6] - | [\uAAB9-\uAABD] - | [\uAAC0] - | [\uAAC2] - | [\uAADB-\uAADD] - | [\uAAE0-\uAAEA] - | [\uAAF2-\uAAF4] - | [\uAB01-\uAB06] - | [\uAB09-\uAB0E] - | [\uAB11-\uAB16] - | [\uAB20-\uAB26] - | [\uAB28-\uAB2E] - | [\uAB30-\uAB5A] - | [\uAB5C-\uAB65] - | [\uAB70-\uABE2] - | [\uAC00-\uD7A3] - | [\uD7B0-\uD7C6] - | [\uD7CB-\uD7FB] - | [\uF900-\uFA6D] - | [\uFA70-\uFAD9] - | [\uFB00-\uFB06] - | [\uFB13-\uFB17] - | [\uFB1D] - | [\uFB1F-\uFB28] - | [\uFB2A-\uFB36] - | [\uFB38-\uFB3C] - | [\uFB3E] - | [\uFB40-\uFB41] - | [\uFB43-\uFB44] - | [\uFB46-\uFBB1] - | [\uFBD3-\uFD3D] - | [\uFD50-\uFD8F] - | [\uFD92-\uFDC7] - | [\uFDF0-\uFDFC] - | [\uFE33-\uFE34] - | [\uFE4D-\uFE4F] - | [\uFE69] - | [\uFE70-\uFE74] - | [\uFE76-\uFEFC] - | [\uFF04] - | [\uFF21-\uFF3A] - | [\uFF3F] - | [\uFF41-\uFF5A] - | [\uFF66-\uFFBE] - | [\uFFC2-\uFFC7] - | [\uFFCA-\uFFCF] - | [\uFFD2-\uFFD7] - | [\uFFDA-\uFFDC] - | [\uFFE0-\uFFE1] - | [\uFFE5-\uFFE6] - ; - -fragment IdentifierPart - : IdentifierStart - | [\u0030-\u0039] - | [\u007F-\u009F] - | [\u00AD] - | [\u0300-\u036F] - | [\u0483-\u0487] - | [\u0591-\u05BD] - | [\u05BF] - | [\u05C1-\u05C2] - | [\u05C4-\u05C5] - | [\u05C7] - | [\u0600-\u0605] - | [\u0610-\u061A] - | [\u061C] - | [\u064B-\u0669] - | [\u0670] - | [\u06D6-\u06DD] - | [\u06DF-\u06E4] - | [\u06E7-\u06E8] - | [\u06EA-\u06ED] - | [\u06F0-\u06F9] - | [\u070F] - | [\u0711] - | [\u0730-\u074A] - | [\u07A6-\u07B0] - | [\u07C0-\u07C9] - | [\u07EB-\u07F3] - | [\u0816-\u0819] - | [\u081B-\u0823] - | [\u0825-\u0827] - | [\u0829-\u082D] - | [\u0859-\u085B] - | [\u08D4-\u0903] - | [\u093A-\u093C] - | [\u093E-\u094F] - | [\u0951-\u0957] - | [\u0962-\u0963] - | [\u0966-\u096F] - | [\u0981-\u0983] - | [\u09BC] - | [\u09BE-\u09C4] - | [\u09C7-\u09C8] - | [\u09CB-\u09CD] - | [\u09D7] - | [\u09E2-\u09E3] - | [\u09E6-\u09EF] - | [\u0A01-\u0A03] - | [\u0A3C] - | [\u0A3E-\u0A42] - | [\u0A47-\u0A48] - | [\u0A4B-\u0A4D] - | [\u0A51] - | [\u0A66-\u0A71] - | [\u0A75] - | [\u0A81-\u0A83] - | [\u0ABC] - | [\u0ABE-\u0AC5] - | [\u0AC7-\u0AC9] - | [\u0ACB-\u0ACD] - | [\u0AE2-\u0AE3] - | [\u0AE6-\u0AEF] - | [\u0AFA-\u0AFF] - | [\u0B01-\u0B03] - | [\u0B3C] - | [\u0B3E-\u0B44] - | [\u0B47-\u0B48] - | [\u0B4B-\u0B4D] - | [\u0B56-\u0B57] - | [\u0B62-\u0B63] - | [\u0B66-\u0B6F] - | [\u0B82] - | [\u0BBE-\u0BC2] - | [\u0BC6-\u0BC8] - | [\u0BCA-\u0BCD] - | [\u0BD7] - | [\u0BE6-\u0BEF] - | [\u0C00-\u0C03] - | [\u0C3E-\u0C44] - | [\u0C46-\u0C48] - | [\u0C4A-\u0C4D] - | [\u0C55-\u0C56] - | [\u0C62-\u0C63] - | [\u0C66-\u0C6F] - | [\u0C81-\u0C83] - | [\u0CBC] - | [\u0CBE-\u0CC4] - | [\u0CC6-\u0CC8] - | [\u0CCA-\u0CCD] - | [\u0CD5-\u0CD6] - | [\u0CE2-\u0CE3] - | [\u0CE6-\u0CEF] - | [\u0D00-\u0D03] - | [\u0D3B-\u0D3C] - | [\u0D3E-\u0D44] - | [\u0D46-\u0D48] - | [\u0D4A-\u0D4D] - | [\u0D57] - | [\u0D62-\u0D63] - | [\u0D66-\u0D6F] - | [\u0D82-\u0D83] - | [\u0DCA] - | [\u0DCF-\u0DD4] - | [\u0DD6] - | [\u0DD8-\u0DDF] - | [\u0DE6-\u0DEF] - | [\u0DF2-\u0DF3] - | [\u0E31] - | [\u0E34-\u0E3A] - | [\u0E47-\u0E4E] - | [\u0E50-\u0E59] - | [\u0EB1] - | [\u0EB4-\u0EB9] - | [\u0EBB-\u0EBC] - | [\u0EC8-\u0ECD] - | [\u0ED0-\u0ED9] - | [\u0F18-\u0F19] - | [\u0F20-\u0F29] - | [\u0F35] - | [\u0F37] - | [\u0F39] - | [\u0F3E-\u0F3F] - | [\u0F71-\u0F84] - | [\u0F86-\u0F87] - | [\u0F8D-\u0F97] - | [\u0F99-\u0FBC] - | [\u0FC6] - | [\u102B-\u103E] - | [\u1040-\u1049] - | [\u1056-\u1059] - | [\u105E-\u1060] - | [\u1062-\u1064] - | [\u1067-\u106D] - | [\u1071-\u1074] - | [\u1082-\u108D] - | [\u108F-\u109D] - | [\u135D-\u135F] - | [\u1712-\u1714] - | [\u1732-\u1734] - | [\u1752-\u1753] - | [\u1772-\u1773] - | [\u17B4-\u17D3] - | [\u17DD] - | [\u17E0-\u17E9] - | [\u180B-\u180E] - | [\u1810-\u1819] - | [\u1885-\u1886] - | [\u18A9] - | [\u1920-\u192B] - | [\u1930-\u193B] - | [\u1946-\u194F] - | [\u19D0-\u19D9] - | [\u1A17-\u1A1B] - | [\u1A55-\u1A5E] - | [\u1A60-\u1A7C] - | [\u1A7F-\u1A89] - | [\u1A90-\u1A99] - | [\u1AB0-\u1ABD] - | [\u1B00-\u1B04] - | [\u1B34-\u1B44] - | [\u1B50-\u1B59] - | [\u1B6B-\u1B73] - | [\u1B80-\u1B82] - | [\u1BA1-\u1BAD] - | [\u1BB0-\u1BB9] - | [\u1BE6-\u1BF3] - | [\u1C24-\u1C37] - | [\u1C40-\u1C49] - | [\u1C50-\u1C59] - | [\u1CD0-\u1CD2] - | [\u1CD4-\u1CE8] - | [\u1CED] - | [\u1CF2-\u1CF4] - | [\u1CF7-\u1CF9] - | [\u1DC0-\u1DF9] - | [\u1DFB-\u1DFF] - | [\u200B-\u200F] - | [\u202A-\u202E] - | [\u2060-\u2064] - | [\u2066-\u206F] - | [\u20D0-\u20DC] - | [\u20E1] - | [\u20E5-\u20F0] - | [\u2CEF-\u2CF1] - | [\u2D7F] - | [\u2DE0-\u2DFF] - | [\u302A-\u302F] - | [\u3099-\u309A] - | [\uA620-\uA629] - | [\uA66F] - | [\uA674-\uA67D] - | [\uA69E-\uA69F] - | [\uA6F0-\uA6F1] - | [\uA802] - | [\uA806] - | [\uA80B] - | [\uA823-\uA827] - | [\uA880-\uA881] - | [\uA8B4-\uA8C5] - | [\uA8D0-\uA8D9] - | [\uA8E0-\uA8F1] - | [\uA900-\uA909] - | [\uA926-\uA92D] - | [\uA947-\uA953] - | [\uA980-\uA983] - | [\uA9B3-\uA9C0] - | [\uA9D0-\uA9D9] - | [\uA9E5] - | [\uA9F0-\uA9F9] - | [\uAA29-\uAA36] - | [\uAA43] - | [\uAA4C-\uAA4D] - | [\uAA50-\uAA59] - | [\uAA7B-\uAA7D] - | [\uAAB0] - | [\uAAB2-\uAAB4] - | [\uAAB7-\uAAB8] - | [\uAABE-\uAABF] - | [\uAAC1] - | [\uAAEB-\uAAEF] - | [\uAAF5-\uAAF6] - | [\uABE3-\uABEA] - | [\uABEC-\uABED] - | [\uABF0-\uABF9] - | [\uFB1E] - | [\uFE00-\uFE0F] - | [\uFE20-\uFE2F] - | [\uFEFF] - | [\uFF10-\uFF19] - | [\uFFF9-\uFFFB] - ; - -// -// Additional symbols not defined in the lexical specification -// - -AT : '@'; -ELLIPSIS : '...'; - -// -// Whitespace and comments -// - -WS : [ \t\r\n\u000C]+ -> skip - ; - -COMMENT - : '/*' .*? '*/' -> skip - ; - -LINE_COMMENT - : '//' ~[\r\n]* -> skip - ; diff --git a/jcommon/antlr/src/main/resources/antlr/java8/Java8Parser.g4 b/jcommon/antlr/src/main/resources/antlr/java8/Java8Parser.g4 deleted file mode 100644 index 1e19b6dee..000000000 --- a/jcommon/antlr/src/main/resources/antlr/java8/Java8Parser.g4 +++ /dev/null @@ -1,1341 +0,0 @@ -/* - * [The "BSD license"] - * Copyright (c) 2014 Terence Parr - * Copyright (c) 2014 Sam Harwell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * A Java 8 grammar for ANTLR 4 derived from the Java Language Specification - * chapter 19. - * - * NOTE: This grammar results in a generated parser that is much slower - * than the Java 7 grammar in the grammars-v4/java directory. This - * one is, however, extremely close to the spec. - * - * You can test with - * - * $ antlr4 Java8.g4 - * $ javac *.java - * $ grun Java8 compilationUnit *.java - * - * Or, -~/antlr/code/grammars-v4/java8 $ java Test . -/Users/parrt/antlr/code/grammars-v4/java8/./Java8BaseListener.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Lexer.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Listener.java -/Users/parrt/antlr/code/grammars-v4/java8/./Java8Parser.java -/Users/parrt/antlr/code/grammars-v4/java8/./Test.java -Total lexer+parser time 30844ms. - */ -parser grammar Java8Parser; - -options { - tokenVocab=Java8Lexer; -} -/* - * Productions from §3 (Lexical Structure) - */ - -literal - : IntegerLiteral - | FloatingPointLiteral - | BooleanLiteral - | CharacterLiteral - | StringLiteral - | NullLiteral - ; - -/* - * Productions from §4 (Types, Values, and Variables) - */ - -primitiveType - : annotation* numericType - | annotation* 'boolean' - ; - -numericType - : integralType - | floatingPointType - ; - -integralType - : 'byte' - | 'short' - | 'int' - | 'long' - | 'char' - ; - -floatingPointType - : 'float' - | 'double' - ; - -referenceType - : classOrInterfaceType - | typeVariable - | arrayType - ; - -classOrInterfaceType - : ( classType_lfno_classOrInterfaceType - | interfaceType_lfno_classOrInterfaceType - ) - ( classType_lf_classOrInterfaceType - | interfaceType_lf_classOrInterfaceType - )* - ; - -classType - : annotation* Identifier typeArguments? - | classOrInterfaceType '.' annotation* Identifier typeArguments? - ; - -classType_lf_classOrInterfaceType - : '.' annotation* Identifier typeArguments? - ; - -classType_lfno_classOrInterfaceType - : annotation* Identifier typeArguments? - ; - -interfaceType - : classType - ; - -interfaceType_lf_classOrInterfaceType - : classType_lf_classOrInterfaceType - ; - -interfaceType_lfno_classOrInterfaceType - : classType_lfno_classOrInterfaceType - ; - -typeVariable - : annotation* Identifier - ; - -arrayType - : primitiveType dims - | classOrInterfaceType dims - | typeVariable dims - ; - -dims - : annotation* '[' ']' (annotation* '[' ']')* - ; - -typeParameter - : typeParameterModifier* Identifier typeBound? - ; - -typeParameterModifier - : annotation - ; - -typeBound - : 'extends' typeVariable - | 'extends' classOrInterfaceType additionalBound* - ; - -additionalBound - : '&' interfaceType - ; - -typeArguments - : '<' typeArgumentList '>' - ; - -typeArgumentList - : typeArgument (',' typeArgument)* - ; - -typeArgument - : referenceType - | wildcard - ; - -wildcard - : annotation* '?' wildcardBounds? - ; - -wildcardBounds - : 'extends' referenceType - | 'super' referenceType - ; - -/* - * Productions from §6 (Names) - */ - -packageName - : Identifier - | packageName '.' Identifier - ; - -typeName - : Identifier - | packageOrTypeName '.' Identifier - ; - -packageOrTypeName - : Identifier - | packageOrTypeName '.' Identifier - ; - -expressionName - : Identifier - | ambiguousName '.' Identifier - ; - -methodName - : Identifier - ; - -ambiguousName - : Identifier - | ambiguousName '.' Identifier - ; - -/* - * Productions from §7 (Packages) - */ - -compilationUnit - : packageDeclaration? importDeclaration* typeDeclaration* EOF - ; - -packageDeclaration - : packageModifier* 'package' packageName ';' - ; - -packageModifier - : annotation - ; - -importDeclaration - : singleTypeImportDeclaration - | typeImportOnDemandDeclaration - | singleStaticImportDeclaration - | staticImportOnDemandDeclaration - ; - -singleTypeImportDeclaration - : 'import' typeName ';' - ; - -typeImportOnDemandDeclaration - : 'import' packageOrTypeName '.' '*' ';' - ; - -singleStaticImportDeclaration - : 'import' 'static' typeName '.' Identifier ';' - ; - -staticImportOnDemandDeclaration - : 'import' 'static' typeName '.' '*' ';' - ; - -typeDeclaration - : classDeclaration - | interfaceDeclaration - | ';' - ; - -/* - * Productions from §8 (Classes) - */ - -classDeclaration - : normalClassDeclaration - | enumDeclaration - ; - -normalClassDeclaration - : classModifier* 'class' Identifier typeParameters? superclass? superinterfaces? classBody - ; - -classModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'abstract' - | 'static' - | 'final' - | 'strictfp' - ; - -typeParameters - : '<' typeParameterList '>' - ; - -typeParameterList - : typeParameter (',' typeParameter)* - ; - -superclass - : 'extends' classType - ; - -superinterfaces - : 'implements' interfaceTypeList - ; - -interfaceTypeList - : interfaceType (',' interfaceType)* - ; - -classBody - : '{' classBodyDeclaration* '}' - ; - -classBodyDeclaration - : classMemberDeclaration - | instanceInitializer - | staticInitializer - | constructorDeclaration - ; - -classMemberDeclaration - : fieldDeclaration - | methodDeclaration - | classDeclaration - | interfaceDeclaration - | ';' - ; - -fieldDeclaration - : fieldModifier* unannType variableDeclaratorList ';' - ; - -fieldModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'static' - | 'final' - | 'transient' - | 'volatile' - ; - -variableDeclaratorList - : variableDeclarator (',' variableDeclarator)* - ; - -variableDeclarator - : variableDeclaratorId ('=' variableInitializer)? - ; - -variableDeclaratorId - : Identifier dims? - ; - -variableInitializer - : expression - | arrayInitializer - ; - -unannType - : unannPrimitiveType - | unannReferenceType - ; - -unannPrimitiveType - : numericType - | 'boolean' - ; - -unannReferenceType - : unannClassOrInterfaceType - | unannTypeVariable - | unannArrayType - ; - -unannClassOrInterfaceType - : ( unannClassType_lfno_unannClassOrInterfaceType - | unannInterfaceType_lfno_unannClassOrInterfaceType - ) - ( unannClassType_lf_unannClassOrInterfaceType - | unannInterfaceType_lf_unannClassOrInterfaceType - )* - ; - -unannClassType - : Identifier typeArguments? - | unannClassOrInterfaceType '.' annotation* Identifier typeArguments? - ; - -unannClassType_lf_unannClassOrInterfaceType - : '.' annotation* Identifier typeArguments? - ; - -unannClassType_lfno_unannClassOrInterfaceType - : Identifier typeArguments? - ; - -unannInterfaceType - : unannClassType - ; - -unannInterfaceType_lf_unannClassOrInterfaceType - : unannClassType_lf_unannClassOrInterfaceType - ; - -unannInterfaceType_lfno_unannClassOrInterfaceType - : unannClassType_lfno_unannClassOrInterfaceType - ; - -unannTypeVariable - : Identifier - ; - -unannArrayType - : unannPrimitiveType dims - | unannClassOrInterfaceType dims - | unannTypeVariable dims - ; - -methodDeclaration - : methodModifier* methodHeader methodBody - ; - -methodModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'abstract' - | 'static' - | 'final' - | 'synchronized' - | 'native' - | 'strictfp' - ; - -methodHeader - : result methodDeclarator throws_? - | typeParameters annotation* result methodDeclarator throws_? - ; - -result - : unannType - | 'void' - ; - -methodDeclarator - : Identifier '(' formalParameterList? ')' dims? - ; - -formalParameterList - : receiverParameter - | formalParameters ',' lastFormalParameter - | lastFormalParameter - ; - -formalParameters - : formalParameter (',' formalParameter)* - | receiverParameter (',' formalParameter)* - ; - -formalParameter - : variableModifier* unannType variableDeclaratorId - ; - -variableModifier - : annotation - | 'final' - ; - -lastFormalParameter - : variableModifier* unannType annotation* '...' variableDeclaratorId - | formalParameter - ; - -receiverParameter - : annotation* unannType (Identifier '.')? 'this' - ; - -throws_ - : 'throws' exceptionTypeList - ; - -exceptionTypeList - : exceptionType (',' exceptionType)* - ; - -exceptionType - : classType - | typeVariable - ; - -methodBody - : block - | ';' - ; - -instanceInitializer - : block - ; - -staticInitializer - : 'static' block - ; - -constructorDeclaration - : constructorModifier* constructorDeclarator throws_? constructorBody - ; - -constructorModifier - : annotation - | 'public' - | 'protected' - | 'private' - ; - -constructorDeclarator - : typeParameters? simpleTypeName '(' formalParameterList? ')' - ; - -simpleTypeName - : Identifier - ; - -constructorBody - : '{' explicitConstructorInvocation? blockStatements? '}' - ; - -explicitConstructorInvocation - : typeArguments? 'this' '(' argumentList? ')' ';' - | typeArguments? 'super' '(' argumentList? ')' ';' - | expressionName '.' typeArguments? 'super' '(' argumentList? ')' ';' - | primary '.' typeArguments? 'super' '(' argumentList? ')' ';' - ; - -enumDeclaration - : classModifier* 'enum' Identifier superinterfaces? enumBody - ; - -enumBody - : '{' enumConstantList? ','? enumBodyDeclarations? '}' - ; - -enumConstantList - : enumConstant (',' enumConstant)* - ; - -enumConstant - : enumConstantModifier* Identifier ('(' argumentList? ')')? classBody? - ; - -enumConstantModifier - : annotation - ; - -enumBodyDeclarations - : ';' classBodyDeclaration* - ; - -/* - * Productions from §9 (Interfaces) - */ - -interfaceDeclaration - : normalInterfaceDeclaration - | annotationTypeDeclaration - ; - -normalInterfaceDeclaration - : interfaceModifier* 'interface' Identifier typeParameters? extendsInterfaces? interfaceBody - ; - -interfaceModifier - : annotation - | 'public' - | 'protected' - | 'private' - | 'abstract' - | 'static' - | 'strictfp' - ; - -extendsInterfaces - : 'extends' interfaceTypeList - ; - -interfaceBody - : '{' interfaceMemberDeclaration* '}' - ; - -interfaceMemberDeclaration - : constantDeclaration - | interfaceMethodDeclaration - | classDeclaration - | interfaceDeclaration - | ';' - ; - -constantDeclaration - : constantModifier* unannType variableDeclaratorList ';' - ; - -constantModifier - : annotation - | 'public' - | 'static' - | 'final' - ; - -interfaceMethodDeclaration - : interfaceMethodModifier* methodHeader methodBody - ; - -interfaceMethodModifier - : annotation - | 'public' - | 'abstract' - | 'default' - | 'static' - | 'strictfp' - ; - -annotationTypeDeclaration - : interfaceModifier* '@' 'interface' Identifier annotationTypeBody - ; - -annotationTypeBody - : '{' annotationTypeMemberDeclaration* '}' - ; - -annotationTypeMemberDeclaration - : annotationTypeElementDeclaration - | constantDeclaration - | classDeclaration - | interfaceDeclaration - | ';' - ; - -annotationTypeElementDeclaration - : annotationTypeElementModifier* unannType Identifier '(' ')' dims? defaultValue? ';' - ; - -annotationTypeElementModifier - : annotation - | 'public' - | 'abstract' - ; - -defaultValue - : 'default' elementValue - ; - -annotation - : normalAnnotation - | markerAnnotation - | singleElementAnnotation - ; - -normalAnnotation - : '@' typeName '(' elementValuePairList? ')' - ; - -elementValuePairList - : elementValuePair (',' elementValuePair)* - ; - -elementValuePair - : Identifier '=' elementValue - ; - -elementValue - : conditionalExpression - | elementValueArrayInitializer - | annotation - ; - -elementValueArrayInitializer - : '{' elementValueList? ','? '}' - ; - -elementValueList - : elementValue (',' elementValue)* - ; - -markerAnnotation - : '@' typeName - ; - -singleElementAnnotation - : '@' typeName '(' elementValue ')' - ; - -/* - * Productions from §10 (Arrays) - */ - -arrayInitializer - : '{' variableInitializerList? ','? '}' - ; - -variableInitializerList - : variableInitializer (',' variableInitializer)* - ; - -/* - * Productions from §14 (Blocks and Statements) - */ - -block - : '{' blockStatements? '}' - ; - -blockStatements - : blockStatement+ - ; - -blockStatement - : localVariableDeclarationStatement - | classDeclaration - | statement - ; - -localVariableDeclarationStatement - : localVariableDeclaration ';' - ; - -localVariableDeclaration - : variableModifier* unannType variableDeclaratorList - ; - -statement - : statementWithoutTrailingSubstatement - | labeledStatement - | ifThenStatement - | ifThenElseStatement - | whileStatement - | forStatement - ; - -statementNoShortIf - : statementWithoutTrailingSubstatement - | labeledStatementNoShortIf - | ifThenElseStatementNoShortIf - | whileStatementNoShortIf - | forStatementNoShortIf - ; - -statementWithoutTrailingSubstatement - : block - | emptyStatement - | expressionStatement - | assertStatement - | switchStatement - | doStatement - | breakStatement - | continueStatement - | returnStatement - | synchronizedStatement - | throwStatement - | tryStatement - ; - -emptyStatement - : ';' - ; - -labeledStatement - : Identifier ':' statement - ; - -labeledStatementNoShortIf - : Identifier ':' statementNoShortIf - ; - -expressionStatement - : statementExpression ';' - ; - -statementExpression - : assignment - | preIncrementExpression - | preDecrementExpression - | postIncrementExpression - | postDecrementExpression - | methodInvocation - | classInstanceCreationExpression - ; - -ifThenStatement - : 'if' '(' expression ')' statement - ; - -ifThenElseStatement - : 'if' '(' expression ')' statementNoShortIf 'else' statement - ; - -ifThenElseStatementNoShortIf - : 'if' '(' expression ')' statementNoShortIf 'else' statementNoShortIf - ; - -assertStatement - : 'assert' expression ';' - | 'assert' expression ':' expression ';' - ; - -switchStatement - : 'switch' '(' expression ')' switchBlock - ; - -switchBlock - : '{' switchBlockStatementGroup* switchLabel* '}' - ; - -switchBlockStatementGroup - : switchLabels blockStatements - ; - -switchLabels - : switchLabel switchLabel* - ; - -switchLabel - : 'case' constantExpression ':' - | 'case' enumConstantName ':' - | 'default' ':' - ; - -enumConstantName - : Identifier - ; - -whileStatement - : 'while' '(' expression ')' statement - ; - -whileStatementNoShortIf - : 'while' '(' expression ')' statementNoShortIf - ; - -doStatement - : 'do' statement 'while' '(' expression ')' ';' - ; - -forStatement - : basicForStatement - | enhancedForStatement - ; - -forStatementNoShortIf - : basicForStatementNoShortIf - | enhancedForStatementNoShortIf - ; - -basicForStatement - : 'for' '(' forInit? ';' expression? ';' forUpdate? ')' statement - ; - -basicForStatementNoShortIf - : 'for' '(' forInit? ';' expression? ';' forUpdate? ')' statementNoShortIf - ; - -forInit - : statementExpressionList - | localVariableDeclaration - ; - -forUpdate - : statementExpressionList - ; - -statementExpressionList - : statementExpression (',' statementExpression)* - ; - -enhancedForStatement - : 'for' '(' variableModifier* unannType variableDeclaratorId ':' expression ')' statement - ; - -enhancedForStatementNoShortIf - : 'for' '(' variableModifier* unannType variableDeclaratorId ':' expression ')' statementNoShortIf - ; - -breakStatement - : 'break' Identifier? ';' - ; - -continueStatement - : 'continue' Identifier? ';' - ; - -returnStatement - : 'return' expression? ';' - ; - -throwStatement - : 'throw' expression ';' - ; - -synchronizedStatement - : 'synchronized' '(' expression ')' block - ; - -tryStatement - : 'try' block catches - | 'try' block catches? finally_ - | tryWithResourcesStatement - ; - -catches - : catchClause catchClause* - ; - -catchClause - : 'catch' '(' catchFormalParameter ')' block - ; - -catchFormalParameter - : variableModifier* catchType variableDeclaratorId - ; - -catchType - : unannClassType ('|' classType)* - ; - -finally_ - : 'finally' block - ; - -tryWithResourcesStatement - : 'try' resourceSpecification block catches? finally_? - ; - -resourceSpecification - : '(' resourceList ';'? ')' - ; - -resourceList - : resource (';' resource)* - ; - -resource - : variableModifier* unannType variableDeclaratorId '=' expression - ; - -/* - * Productions from §15 (Expressions) - */ - -primary - : ( primaryNoNewArray_lfno_primary - | arrayCreationExpression - ) - ( primaryNoNewArray_lf_primary - )* - ; - -primaryNoNewArray - : literal - | typeName ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression - | fieldAccess - | arrayAccess - | methodInvocation - | methodReference - ; - -primaryNoNewArray_lf_arrayAccess - : - ; - -primaryNoNewArray_lfno_arrayAccess - : literal - | typeName ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression - | fieldAccess - | methodInvocation - | methodReference - ; - -primaryNoNewArray_lf_primary - : classInstanceCreationExpression_lf_primary - | fieldAccess_lf_primary - | arrayAccess_lf_primary - | methodInvocation_lf_primary - | methodReference_lf_primary - ; - -primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary - : - ; - -primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary - : classInstanceCreationExpression_lf_primary - | fieldAccess_lf_primary - | methodInvocation_lf_primary - | methodReference_lf_primary - ; - -primaryNoNewArray_lfno_primary - : literal - | typeName ('[' ']')* '.' 'class' - | unannPrimitiveType ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression_lfno_primary - | fieldAccess_lfno_primary - | arrayAccess_lfno_primary - | methodInvocation_lfno_primary - | methodReference_lfno_primary - ; - -primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary - : - ; - -primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary - : literal - | typeName ('[' ']')* '.' 'class' - | unannPrimitiveType ('[' ']')* '.' 'class' - | 'void' '.' 'class' - | 'this' - | typeName '.' 'this' - | '(' expression ')' - | classInstanceCreationExpression_lfno_primary - | fieldAccess_lfno_primary - | methodInvocation_lfno_primary - | methodReference_lfno_primary - ; - -classInstanceCreationExpression - : 'new' typeArguments? annotation* Identifier ('.' annotation* Identifier)* typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - | expressionName '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - | primary '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - ; - -classInstanceCreationExpression_lf_primary - : '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - ; - -classInstanceCreationExpression_lfno_primary - : 'new' typeArguments? annotation* Identifier ('.' annotation* Identifier)* typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - | expressionName '.' 'new' typeArguments? annotation* Identifier typeArgumentsOrDiamond? '(' argumentList? ')' classBody? - ; - -typeArgumentsOrDiamond - : typeArguments - | '<' '>' - ; - -fieldAccess - : primary '.' Identifier - | 'super' '.' Identifier - | typeName '.' 'super' '.' Identifier - ; - -fieldAccess_lf_primary - : '.' Identifier - ; - -fieldAccess_lfno_primary - : 'super' '.' Identifier - | typeName '.' 'super' '.' Identifier - ; - -arrayAccess - : ( expressionName '[' expression ']' - | primaryNoNewArray_lfno_arrayAccess '[' expression ']' - ) - ( primaryNoNewArray_lf_arrayAccess '[' expression ']' - )* - ; - -arrayAccess_lf_primary - : ( primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary '[' expression ']' - ) - ( primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary '[' expression ']' - )* - ; - -arrayAccess_lfno_primary - : ( expressionName '[' expression ']' - | primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary '[' expression ']' - ) - ( primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary '[' expression ']' - )* - ; - -methodInvocation - : methodName '(' argumentList? ')' - | typeName '.' typeArguments? Identifier '(' argumentList? ')' - | expressionName '.' typeArguments? Identifier '(' argumentList? ')' - | primary '.' typeArguments? Identifier '(' argumentList? ')' - | 'super' '.' typeArguments? Identifier '(' argumentList? ')' - | typeName '.' 'super' '.' typeArguments? Identifier '(' argumentList? ')' - ; - -methodInvocation_lf_primary - : '.' typeArguments? Identifier '(' argumentList? ')' - ; - -methodInvocation_lfno_primary - : methodName '(' argumentList? ')' - | typeName '.' typeArguments? Identifier '(' argumentList? ')' - | expressionName '.' typeArguments? Identifier '(' argumentList? ')' - | 'super' '.' typeArguments? Identifier '(' argumentList? ')' - | typeName '.' 'super' '.' typeArguments? Identifier '(' argumentList? ')' - ; - -argumentList - : expression (',' expression)* - ; - -methodReference - : expressionName '::' typeArguments? Identifier - | referenceType '::' typeArguments? Identifier - | primary '::' typeArguments? Identifier - | 'super' '::' typeArguments? Identifier - | typeName '.' 'super' '::' typeArguments? Identifier - | classType '::' typeArguments? 'new' - | arrayType '::' 'new' - ; - -methodReference_lf_primary - : '::' typeArguments? Identifier - ; - -methodReference_lfno_primary - : expressionName '::' typeArguments? Identifier - | referenceType '::' typeArguments? Identifier - | 'super' '::' typeArguments? Identifier - | typeName '.' 'super' '::' typeArguments? Identifier - | classType '::' typeArguments? 'new' - | arrayType '::' 'new' - ; - -arrayCreationExpression - : 'new' primitiveType dimExprs dims? - | 'new' classOrInterfaceType dimExprs dims? - | 'new' primitiveType dims arrayInitializer - | 'new' classOrInterfaceType dims arrayInitializer - ; - -dimExprs - : dimExpr dimExpr* - ; - -dimExpr - : annotation* '[' expression ']' - ; - -constantExpression - : expression - ; - -expression - : lambdaExpression - | assignmentExpression - ; - -lambdaExpression - : lambdaParameters '->' lambdaBody - ; - -lambdaParameters - : Identifier - | '(' formalParameterList? ')' - | '(' inferredFormalParameterList ')' - ; - -inferredFormalParameterList - : Identifier (',' Identifier)* - ; - -lambdaBody - : expression - | block - ; - -assignmentExpression - : conditionalExpression - | assignment - ; - -assignment - : leftHandSide assignmentOperator expression - ; - -leftHandSide - : expressionName - | fieldAccess - | arrayAccess - ; - -assignmentOperator - : '=' - | '*=' - | '/=' - | '%=' - | '+=' - | '-=' - | '<<=' - | '>>=' - | '>>>=' - | '&=' - | '^=' - | '|=' - ; - -conditionalExpression - : conditionalOrExpression - | conditionalOrExpression '?' expression ':' conditionalExpression - ; - -conditionalOrExpression - : conditionalAndExpression - | conditionalOrExpression '||' conditionalAndExpression - ; - -conditionalAndExpression - : inclusiveOrExpression - | conditionalAndExpression '&&' inclusiveOrExpression - ; - -inclusiveOrExpression - : exclusiveOrExpression - | inclusiveOrExpression '|' exclusiveOrExpression - ; - -exclusiveOrExpression - : andExpression - | exclusiveOrExpression '^' andExpression - ; - -andExpression - : equalityExpression - | andExpression '&' equalityExpression - ; - -equalityExpression - : relationalExpression - | equalityExpression '==' relationalExpression - | equalityExpression '!=' relationalExpression - ; - -relationalExpression - : shiftExpression - | relationalExpression '<' shiftExpression - | relationalExpression '>' shiftExpression - | relationalExpression '<=' shiftExpression - | relationalExpression '>=' shiftExpression - | relationalExpression 'instanceof' referenceType - ; - -shiftExpression - : additiveExpression - | shiftExpression '<' '<' additiveExpression - | shiftExpression '>' '>' additiveExpression - | shiftExpression '>' '>' '>' additiveExpression - ; - -additiveExpression - : multiplicativeExpression - | additiveExpression '+' multiplicativeExpression - | additiveExpression '-' multiplicativeExpression - ; - -multiplicativeExpression - : unaryExpression - | multiplicativeExpression '*' unaryExpression - | multiplicativeExpression '/' unaryExpression - | multiplicativeExpression '%' unaryExpression - ; - -unaryExpression - : preIncrementExpression - | preDecrementExpression - | '+' unaryExpression - | '-' unaryExpression - | unaryExpressionNotPlusMinus - ; - -preIncrementExpression - : '++' unaryExpression - ; - -preDecrementExpression - : '--' unaryExpression - ; - -unaryExpressionNotPlusMinus - : postfixExpression - | '~' unaryExpression - | '!' unaryExpression - | castExpression - ; - -postfixExpression - : ( primary - | expressionName - ) - ( postIncrementExpression_lf_postfixExpression - | postDecrementExpression_lf_postfixExpression - )* - ; - -postIncrementExpression - : postfixExpression '++' - ; - -postIncrementExpression_lf_postfixExpression - : '++' - ; - -postDecrementExpression - : postfixExpression '--' - ; - -postDecrementExpression_lf_postfixExpression - : '--' - ; - -castExpression - : '(' primitiveType ')' unaryExpression - | '(' referenceType additionalBound* ')' unaryExpressionNotPlusMinus - | '(' referenceType additionalBound* ')' lambdaExpression - ; diff --git a/jcommon/antlr/src/test/java/comxiaomi/data/push/test/Field.java b/jcommon/antlr/src/test/java/comxiaomi/data/push/test/Field.java new file mode 100644 index 000000000..a478063a3 --- /dev/null +++ b/jcommon/antlr/src/test/java/comxiaomi/data/push/test/Field.java @@ -0,0 +1,21 @@ +package comxiaomi.data.push.test; + +import lombok.Builder; +import lombok.Data; + +/** + * @author goodjava@qq.com + * @date 2024/2/1 18:11 + */ +@Data +@Builder +public class Field { + + public String k; + + public String v; + + public String type; + + +} diff --git a/jcommon/antlr/src/test/java/comxiaomi/data/push/test/GolangTest.java b/jcommon/antlr/src/test/java/comxiaomi/data/push/test/GolangTest.java new file mode 100644 index 000000000..3a95a443b --- /dev/null +++ b/jcommon/antlr/src/test/java/comxiaomi/data/push/test/GolangTest.java @@ -0,0 +1,192 @@ +package comxiaomi.data.push.test; + +import lombok.Builder; +import lombok.Data; +import lombok.SneakyThrows; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeWalker; +import org.junit.Test; +import run.mone.antlr.golang.*; + +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author goodjava@qq.com + * @date 2024/1/29 16:28 + */ +public class GolangTest { + + @Data + @Builder + static class MI { + public String name; + public Liststring cmd = 1;
+ * @return The cmd.
+ */
+ @java.lang.Override
+ public java.lang.String getCmd() {
+ java.lang.Object ref = cmd_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ cmd_ = s;
+ return s;
+ }
+ }
+ /**
+ * string cmd = 1;
+ * @return The bytes for cmd.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getCmdBytes() {
+ java.lang.Object ref = cmd_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ cmd_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CMDMETA_FIELD_NUMBER = 2;
+ private static final class CmdMetaDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .map<string, string> cmdMeta = 2;
+ */
+
+ @java.lang.Override
+ public boolean containsCmdMeta(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetCmdMeta().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getCmdMetaMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getCmdMetaOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getCmdMetaOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapstring cmd = 1;
+ * @return The cmd.
+ */
+ public java.lang.String getCmd() {
+ java.lang.Object ref = cmd_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ cmd_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string cmd = 1;
+ * @return The bytes for cmd.
+ */
+ public com.google.protobuf.ByteString
+ getCmdBytes() {
+ java.lang.Object ref = cmd_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ cmd_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string cmd = 1;
+ * @param value The cmd to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCmd(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ cmd_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string cmd = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearCmd() {
+
+ cmd_ = getDefaultInstance().getCmd();
+ onChanged();
+ return this;
+ }
+ /**
+ * string cmd = 1;
+ * @param value The bytes for cmd to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCmdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ cmd_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> cmdMeta_;
+ private com.google.protobuf.MapFieldmap<string, string> cmdMeta = 2;
+ */
+
+ @java.lang.Override
+ public boolean containsCmdMeta(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetCmdMeta().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getCmdMetaMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getCmdMetaOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getCmdMetaOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+
+ public Builder removeCmdMeta(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ internalGetMutableCmdMeta().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ public Builder putCmdMeta(
+ java.lang.String key,
+ java.lang.String value) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ if (value == null) {
+ throw new NullPointerException("map value");
+}
+
+ internalGetMutableCmdMeta().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * map<string, string> cmdMeta = 2;
+ */
+
+ public Builder putAllCmdMeta(
+ java.util.Mapstring cmd = 1;
+ * @return The cmd.
+ */
+ java.lang.String getCmd();
+ /**
+ * string cmd = 1;
+ * @return The bytes for cmd.
+ */
+ com.google.protobuf.ByteString
+ getCmdBytes();
+
+ /**
+ * map<string, string> cmdMeta = 2;
+ */
+ int getCmdMetaCount();
+ /**
+ * map<string, string> cmdMeta = 2;
+ */
+ boolean containsCmdMeta(
+ java.lang.String key);
+ /**
+ * Use {@link #getCmdMetaMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+ java.util.Mapmap<string, string> cmdMeta = 2;
+ */
+
+ java.lang.String getCmdMetaOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue);
+ /**
+ * map<string, string> cmdMeta = 2;
+ */
+
+ java.lang.String getCmdMetaOrThrow(
+ java.lang.String key);
+}
diff --git a/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/AiMessage.java b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/AiMessage.java
new file mode 100644
index 000000000..231d4b503
--- /dev/null
+++ b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/AiMessage.java
@@ -0,0 +1,1603 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bo.proto
+
+package run.mone.local.docean.protobuf;
+
+/**
+ * Protobuf type {@code run.mone.local.docean.protobuf.AiMessage}
+ */
+public final class AiMessage extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:run.mone.local.docean.protobuf.AiMessage)
+ AiMessageOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use AiMessage.newBuilder() to construct.
+ private AiMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private AiMessage() {
+ cmd_ = "";
+ message_ = "";
+ data_ = "";
+ from_ = "";
+ to_ = "";
+ topicId_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new AiMessage();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private AiMessage(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ cmd_ = s;
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ messageMeta_ = com.google.protobuf.MapField.newMapField(
+ MessageMetaDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000001;
+ }
+ com.google.protobuf.MapEntrystring cmd = 1;
+ * @return The cmd.
+ */
+ @java.lang.Override
+ public java.lang.String getCmd() {
+ java.lang.Object ref = cmd_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ cmd_ = s;
+ return s;
+ }
+ }
+ /**
+ * string cmd = 1;
+ * @return The bytes for cmd.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getCmdBytes() {
+ java.lang.Object ref = cmd_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ cmd_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MESSAGEMETA_FIELD_NUMBER = 2;
+ private static final class MessageMetaDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .map<string, string> messageMeta = 2;
+ */
+
+ @java.lang.Override
+ public boolean containsMessageMeta(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetMessageMeta().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getMessageMetaMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMessageMetaOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMessageMetaOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapstring message = 3;
+ * @return The message.
+ */
+ @java.lang.Override
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ message_ = s;
+ return s;
+ }
+ }
+ /**
+ * string message = 3;
+ * @return The bytes for message.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TIME_FIELD_NUMBER = 4;
+ private long time_;
+ /**
+ * int64 time = 4;
+ * @return The time.
+ */
+ @java.lang.Override
+ public long getTime() {
+ return time_;
+ }
+
+ public static final int DATA_FIELD_NUMBER = 5;
+ private volatile java.lang.Object data_;
+ /**
+ * string data = 5;
+ * @return The data.
+ */
+ @java.lang.Override
+ public java.lang.String getData() {
+ java.lang.Object ref = data_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ data_ = s;
+ return s;
+ }
+ }
+ /**
+ * string data = 5;
+ * @return The bytes for data.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getDataBytes() {
+ java.lang.Object ref = data_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ data_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FROM_FIELD_NUMBER = 6;
+ private volatile java.lang.Object from_;
+ /**
+ * string from = 6;
+ * @return The from.
+ */
+ @java.lang.Override
+ public java.lang.String getFrom() {
+ java.lang.Object ref = from_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ from_ = s;
+ return s;
+ }
+ }
+ /**
+ * string from = 6;
+ * @return The bytes for from.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getFromBytes() {
+ java.lang.Object ref = from_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ from_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TO_FIELD_NUMBER = 7;
+ private volatile java.lang.Object to_;
+ /**
+ * string to = 7;
+ * @return The to.
+ */
+ @java.lang.Override
+ public java.lang.String getTo() {
+ java.lang.Object ref = to_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ to_ = s;
+ return s;
+ }
+ }
+ /**
+ * string to = 7;
+ * @return The bytes for to.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getToBytes() {
+ java.lang.Object ref = to_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ to_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TOPICID_FIELD_NUMBER = 8;
+ private volatile java.lang.Object topicId_;
+ /**
+ * string topicId = 8;
+ * @return The topicId.
+ */
+ @java.lang.Override
+ public java.lang.String getTopicId() {
+ java.lang.Object ref = topicId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ topicId_ = s;
+ return s;
+ }
+ }
+ /**
+ * string topicId = 8;
+ * @return The bytes for topicId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getTopicIdBytes() {
+ java.lang.Object ref = topicId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ topicId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmd_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cmd_);
+ }
+ com.google.protobuf.GeneratedMessageV3
+ .serializeStringMapTo(
+ output,
+ internalGetMessageMeta(),
+ MessageMetaDefaultEntryHolder.defaultEntry,
+ 2);
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_);
+ }
+ if (time_ != 0L) {
+ output.writeInt64(4, time_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, data_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, from_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, to_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topicId_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, topicId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmd_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cmd_);
+ }
+ for (java.util.Map.Entrystring cmd = 1;
+ * @return The cmd.
+ */
+ public java.lang.String getCmd() {
+ java.lang.Object ref = cmd_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ cmd_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string cmd = 1;
+ * @return The bytes for cmd.
+ */
+ public com.google.protobuf.ByteString
+ getCmdBytes() {
+ java.lang.Object ref = cmd_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ cmd_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string cmd = 1;
+ * @param value The cmd to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCmd(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ cmd_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string cmd = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearCmd() {
+
+ cmd_ = getDefaultInstance().getCmd();
+ onChanged();
+ return this;
+ }
+ /**
+ * string cmd = 1;
+ * @param value The bytes for cmd to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCmdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ cmd_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> messageMeta_;
+ private com.google.protobuf.MapFieldmap<string, string> messageMeta = 2;
+ */
+
+ @java.lang.Override
+ public boolean containsMessageMeta(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetMessageMeta().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getMessageMetaMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMessageMetaOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMessageMetaOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> messageMeta = 2;
+ */
+
+ public Builder removeMessageMeta(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ internalGetMutableMessageMeta().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ public Builder putMessageMeta(
+ java.lang.String key,
+ java.lang.String value) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ if (value == null) {
+ throw new NullPointerException("map value");
+}
+
+ internalGetMutableMessageMeta().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * map<string, string> messageMeta = 2;
+ */
+
+ public Builder putAllMessageMeta(
+ java.util.Mapstring message = 3;
+ * @return The message.
+ */
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ message_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string message = 3;
+ * @return The bytes for message.
+ */
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string message = 3;
+ * @param value The message to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMessage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ message_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string message = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearMessage() {
+
+ message_ = getDefaultInstance().getMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ * string message = 3;
+ * @param value The bytes for message to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMessageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ message_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long time_ ;
+ /**
+ * int64 time = 4;
+ * @return The time.
+ */
+ @java.lang.Override
+ public long getTime() {
+ return time_;
+ }
+ /**
+ * int64 time = 4;
+ * @param value The time to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTime(long value) {
+
+ time_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 time = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearTime() {
+
+ time_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object data_ = "";
+ /**
+ * string data = 5;
+ * @return The data.
+ */
+ public java.lang.String getData() {
+ java.lang.Object ref = data_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ data_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string data = 5;
+ * @return The bytes for data.
+ */
+ public com.google.protobuf.ByteString
+ getDataBytes() {
+ java.lang.Object ref = data_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ data_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string data = 5;
+ * @param value The data to set.
+ * @return This builder for chaining.
+ */
+ public Builder setData(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ data_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string data = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearData() {
+
+ data_ = getDefaultInstance().getData();
+ onChanged();
+ return this;
+ }
+ /**
+ * string data = 5;
+ * @param value The bytes for data to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDataBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ data_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object from_ = "";
+ /**
+ * string from = 6;
+ * @return The from.
+ */
+ public java.lang.String getFrom() {
+ java.lang.Object ref = from_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ from_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string from = 6;
+ * @return The bytes for from.
+ */
+ public com.google.protobuf.ByteString
+ getFromBytes() {
+ java.lang.Object ref = from_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ from_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string from = 6;
+ * @param value The from to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFrom(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ from_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string from = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearFrom() {
+
+ from_ = getDefaultInstance().getFrom();
+ onChanged();
+ return this;
+ }
+ /**
+ * string from = 6;
+ * @param value The bytes for from to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFromBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ from_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object to_ = "";
+ /**
+ * string to = 7;
+ * @return The to.
+ */
+ public java.lang.String getTo() {
+ java.lang.Object ref = to_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ to_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string to = 7;
+ * @return The bytes for to.
+ */
+ public com.google.protobuf.ByteString
+ getToBytes() {
+ java.lang.Object ref = to_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ to_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string to = 7;
+ * @param value The to to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTo(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ to_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string to = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearTo() {
+
+ to_ = getDefaultInstance().getTo();
+ onChanged();
+ return this;
+ }
+ /**
+ * string to = 7;
+ * @param value The bytes for to to set.
+ * @return This builder for chaining.
+ */
+ public Builder setToBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ to_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object topicId_ = "";
+ /**
+ * string topicId = 8;
+ * @return The topicId.
+ */
+ public java.lang.String getTopicId() {
+ java.lang.Object ref = topicId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ topicId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string topicId = 8;
+ * @return The bytes for topicId.
+ */
+ public com.google.protobuf.ByteString
+ getTopicIdBytes() {
+ java.lang.Object ref = topicId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ topicId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string topicId = 8;
+ * @param value The topicId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTopicId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ topicId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string topicId = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearTopicId() {
+
+ topicId_ = getDefaultInstance().getTopicId();
+ onChanged();
+ return this;
+ }
+ /**
+ * string topicId = 8;
+ * @param value The bytes for topicId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTopicIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ topicId_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:run.mone.local.docean.protobuf.AiMessage)
+ }
+
+ // @@protoc_insertion_point(class_scope:run.mone.local.docean.protobuf.AiMessage)
+ private static final run.mone.local.docean.protobuf.AiMessage DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new run.mone.local.docean.protobuf.AiMessage();
+ }
+
+ public static run.mone.local.docean.protobuf.AiMessage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parserstring cmd = 1;
+ * @return The cmd.
+ */
+ java.lang.String getCmd();
+ /**
+ * string cmd = 1;
+ * @return The bytes for cmd.
+ */
+ com.google.protobuf.ByteString
+ getCmdBytes();
+
+ /**
+ * map<string, string> messageMeta = 2;
+ */
+ int getMessageMetaCount();
+ /**
+ * map<string, string> messageMeta = 2;
+ */
+ boolean containsMessageMeta(
+ java.lang.String key);
+ /**
+ * Use {@link #getMessageMetaMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Mapmap<string, string> messageMeta = 2;
+ */
+ java.util.Mapmap<string, string> messageMeta = 2;
+ */
+
+ /* nullable */
+java.lang.String getMessageMetaOrDefault(
+ java.lang.String key,
+ /* nullable */
+java.lang.String defaultValue);
+ /**
+ * map<string, string> messageMeta = 2;
+ */
+
+ java.lang.String getMessageMetaOrThrow(
+ java.lang.String key);
+
+ /**
+ * string message = 3;
+ * @return The message.
+ */
+ java.lang.String getMessage();
+ /**
+ * string message = 3;
+ * @return The bytes for message.
+ */
+ com.google.protobuf.ByteString
+ getMessageBytes();
+
+ /**
+ * int64 time = 4;
+ * @return The time.
+ */
+ long getTime();
+
+ /**
+ * string data = 5;
+ * @return The data.
+ */
+ java.lang.String getData();
+ /**
+ * string data = 5;
+ * @return The bytes for data.
+ */
+ com.google.protobuf.ByteString
+ getDataBytes();
+
+ /**
+ * string from = 6;
+ * @return The from.
+ */
+ java.lang.String getFrom();
+ /**
+ * string from = 6;
+ * @return The bytes for from.
+ */
+ com.google.protobuf.ByteString
+ getFromBytes();
+
+ /**
+ * string to = 7;
+ * @return The to.
+ */
+ java.lang.String getTo();
+ /**
+ * string to = 7;
+ * @return The bytes for to.
+ */
+ com.google.protobuf.ByteString
+ getToBytes();
+
+ /**
+ * string topicId = 8;
+ * @return The topicId.
+ */
+ java.lang.String getTopicId();
+ /**
+ * string topicId = 8;
+ * @return The bytes for topicId.
+ */
+ com.google.protobuf.ByteString
+ getTopicIdBytes();
+}
diff --git a/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/AiResult.java b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/AiResult.java
new file mode 100644
index 000000000..39a555cab
--- /dev/null
+++ b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/AiResult.java
@@ -0,0 +1,910 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bo.proto
+
+package run.mone.local.docean.protobuf;
+
+/**
+ * Protobuf type {@code run.mone.local.docean.protobuf.AiResult}
+ */
+public final class AiResult extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:run.mone.local.docean.protobuf.AiResult)
+ AiResultOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use AiResult.newBuilder() to construct.
+ private AiResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private AiResult() {
+ message_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new AiResult();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private AiResult(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+
+ code_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ message_ = s;
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ data_ = com.google.protobuf.MapField.newMapField(
+ DataDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000001;
+ }
+ com.google.protobuf.MapEntryint32 code = 1;
+ * @return The code.
+ */
+ @java.lang.Override
+ public int getCode() {
+ return code_;
+ }
+
+ public static final int MESSAGE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object message_;
+ /**
+ * string message = 2;
+ * @return The message.
+ */
+ @java.lang.Override
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ message_ = s;
+ return s;
+ }
+ }
+ /**
+ * string message = 2;
+ * @return The bytes for message.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DATA_FIELD_NUMBER = 3;
+ private static final class DataDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .map<string, string> data = 3;
+ */
+
+ @java.lang.Override
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 3;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> data = 3;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> data = 3;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapint32 code = 1;
+ * @return The code.
+ */
+ @java.lang.Override
+ public int getCode() {
+ return code_;
+ }
+ /**
+ * int32 code = 1;
+ * @param value The code to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCode(int value) {
+
+ code_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 code = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearCode() {
+
+ code_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object message_ = "";
+ /**
+ * string message = 2;
+ * @return The message.
+ */
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ message_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string message = 2;
+ * @return The bytes for message.
+ */
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string message = 2;
+ * @param value The message to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMessage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ message_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string message = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearMessage() {
+
+ message_ = getDefaultInstance().getMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ * string message = 2;
+ * @param value The bytes for message to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMessageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ message_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> data_;
+ private com.google.protobuf.MapFieldmap<string, string> data = 3;
+ */
+
+ @java.lang.Override
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 3;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> data = 3;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> data = 3;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> data = 3;
+ */
+
+ public Builder removeData(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ internalGetMutableData().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 3;
+ */
+ public Builder putData(
+ java.lang.String key,
+ java.lang.String value) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ if (value == null) {
+ throw new NullPointerException("map value");
+}
+
+ internalGetMutableData().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * map<string, string> data = 3;
+ */
+
+ public Builder putAllData(
+ java.util.Mapint32 code = 1;
+ * @return The code.
+ */
+ int getCode();
+
+ /**
+ * string message = 2;
+ * @return The message.
+ */
+ java.lang.String getMessage();
+ /**
+ * string message = 2;
+ * @return The bytes for message.
+ */
+ com.google.protobuf.ByteString
+ getMessageBytes();
+
+ /**
+ * map<string, string> data = 3;
+ */
+ int getDataCount();
+ /**
+ * map<string, string> data = 3;
+ */
+ boolean containsData(
+ java.lang.String key);
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Mapmap<string, string> data = 3;
+ */
+ java.util.Mapmap<string, string> data = 3;
+ */
+
+ java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue);
+ /**
+ * map<string, string> data = 3;
+ */
+
+ java.lang.String getDataOrThrow(
+ java.lang.String key);
+}
diff --git a/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/BeatInfoData.java b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/BeatInfoData.java
new file mode 100644
index 000000000..e41a7c6b7
--- /dev/null
+++ b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/BeatInfoData.java
@@ -0,0 +1,1587 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bo.proto
+
+package run.mone.local.docean.protobuf;
+
+/**
+ * Protobuf type {@code run.mone.local.docean.protobuf.BeatInfoData}
+ */
+public final class BeatInfoData extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:run.mone.local.docean.protobuf.BeatInfoData)
+ BeatInfoDataOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use BeatInfoData.newBuilder() to construct.
+ private BeatInfoData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private BeatInfoData() {
+ serviceName_ = "";
+ namespaceId_ = "";
+ clusterName_ = "";
+ ip_ = "";
+ beat_ = "";
+ appName_ = "";
+ agent_ = "";
+ source_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new BeatInfoData();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BeatInfoData(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ serviceName_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ namespaceId_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ clusterName_ = s;
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ ip_ = s;
+ break;
+ }
+ case 40: {
+
+ port_ = input.readInt32();
+ break;
+ }
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ beat_ = s;
+ break;
+ }
+ case 58: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ appName_ = s;
+ break;
+ }
+ case 66: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ agent_ = s;
+ break;
+ }
+ case 74: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ source_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return run.mone.local.docean.protobuf.Bo.internal_static_run_mone_local_docean_protobuf_BeatInfoData_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return run.mone.local.docean.protobuf.Bo.internal_static_run_mone_local_docean_protobuf_BeatInfoData_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ run.mone.local.docean.protobuf.BeatInfoData.class, run.mone.local.docean.protobuf.BeatInfoData.Builder.class);
+ }
+
+ public static final int SERVICENAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object serviceName_;
+ /**
+ * string serviceName = 1;
+ * @return The serviceName.
+ */
+ @java.lang.Override
+ public java.lang.String getServiceName() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceName_ = s;
+ return s;
+ }
+ }
+ /**
+ * string serviceName = 1;
+ * @return The bytes for serviceName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getServiceNameBytes() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ serviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NAMESPACEID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object namespaceId_;
+ /**
+ * string namespaceId = 2;
+ * @return The namespaceId.
+ */
+ @java.lang.Override
+ public java.lang.String getNamespaceId() {
+ java.lang.Object ref = namespaceId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ namespaceId_ = s;
+ return s;
+ }
+ }
+ /**
+ * string namespaceId = 2;
+ * @return The bytes for namespaceId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getNamespaceIdBytes() {
+ java.lang.Object ref = namespaceId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ namespaceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CLUSTERNAME_FIELD_NUMBER = 3;
+ private volatile java.lang.Object clusterName_;
+ /**
+ * string clusterName = 3;
+ * @return The clusterName.
+ */
+ @java.lang.Override
+ public java.lang.String getClusterName() {
+ java.lang.Object ref = clusterName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clusterName_ = s;
+ return s;
+ }
+ }
+ /**
+ * string clusterName = 3;
+ * @return The bytes for clusterName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClusterNameBytes() {
+ java.lang.Object ref = clusterName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ clusterName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IP_FIELD_NUMBER = 4;
+ private volatile java.lang.Object ip_;
+ /**
+ * string ip = 4;
+ * @return The ip.
+ */
+ @java.lang.Override
+ public java.lang.String getIp() {
+ java.lang.Object ref = ip_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ ip_ = s;
+ return s;
+ }
+ }
+ /**
+ * string ip = 4;
+ * @return The bytes for ip.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getIpBytes() {
+ java.lang.Object ref = ip_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ ip_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PORT_FIELD_NUMBER = 5;
+ private int port_;
+ /**
+ * int32 port = 5;
+ * @return The port.
+ */
+ @java.lang.Override
+ public int getPort() {
+ return port_;
+ }
+
+ public static final int BEAT_FIELD_NUMBER = 6;
+ private volatile java.lang.Object beat_;
+ /**
+ * string beat = 6;
+ * @return The beat.
+ */
+ @java.lang.Override
+ public java.lang.String getBeat() {
+ java.lang.Object ref = beat_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ beat_ = s;
+ return s;
+ }
+ }
+ /**
+ * string beat = 6;
+ * @return The bytes for beat.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getBeatBytes() {
+ java.lang.Object ref = beat_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ beat_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int APPNAME_FIELD_NUMBER = 7;
+ private volatile java.lang.Object appName_;
+ /**
+ * string appName = 7;
+ * @return The appName.
+ */
+ @java.lang.Override
+ public java.lang.String getAppName() {
+ java.lang.Object ref = appName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ appName_ = s;
+ return s;
+ }
+ }
+ /**
+ * string appName = 7;
+ * @return The bytes for appName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getAppNameBytes() {
+ java.lang.Object ref = appName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ appName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int AGENT_FIELD_NUMBER = 8;
+ private volatile java.lang.Object agent_;
+ /**
+ * string agent = 8;
+ * @return The agent.
+ */
+ @java.lang.Override
+ public java.lang.String getAgent() {
+ java.lang.Object ref = agent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ agent_ = s;
+ return s;
+ }
+ }
+ /**
+ * string agent = 8;
+ * @return The bytes for agent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getAgentBytes() {
+ java.lang.Object ref = agent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ agent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SOURCE_FIELD_NUMBER = 9;
+ private volatile java.lang.Object source_;
+ /**
+ * string source = 9;
+ * @return The source.
+ */
+ @java.lang.Override
+ public java.lang.String getSource() {
+ java.lang.Object ref = source_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ source_ = s;
+ return s;
+ }
+ }
+ /**
+ * string source = 9;
+ * @return The bytes for source.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getSourceBytes() {
+ java.lang.Object ref = source_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ source_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespaceId_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ip_);
+ }
+ if (port_ != 0) {
+ output.writeInt32(5, port_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(beat_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, beat_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appName_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, appName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, agent_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 9, source_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespaceId_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ip_);
+ }
+ if (port_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(5, port_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(beat_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, beat_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appName_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, appName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, agent_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, source_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof run.mone.local.docean.protobuf.BeatInfoData)) {
+ return super.equals(obj);
+ }
+ run.mone.local.docean.protobuf.BeatInfoData other = (run.mone.local.docean.protobuf.BeatInfoData) obj;
+
+ if (!getServiceName()
+ .equals(other.getServiceName())) return false;
+ if (!getNamespaceId()
+ .equals(other.getNamespaceId())) return false;
+ if (!getClusterName()
+ .equals(other.getClusterName())) return false;
+ if (!getIp()
+ .equals(other.getIp())) return false;
+ if (getPort()
+ != other.getPort()) return false;
+ if (!getBeat()
+ .equals(other.getBeat())) return false;
+ if (!getAppName()
+ .equals(other.getAppName())) return false;
+ if (!getAgent()
+ .equals(other.getAgent())) return false;
+ if (!getSource()
+ .equals(other.getSource())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERVICENAME_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceName().hashCode();
+ hash = (37 * hash) + NAMESPACEID_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespaceId().hashCode();
+ hash = (37 * hash) + CLUSTERNAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClusterName().hashCode();
+ hash = (37 * hash) + IP_FIELD_NUMBER;
+ hash = (53 * hash) + getIp().hashCode();
+ hash = (37 * hash) + PORT_FIELD_NUMBER;
+ hash = (53 * hash) + getPort();
+ hash = (37 * hash) + BEAT_FIELD_NUMBER;
+ hash = (53 * hash) + getBeat().hashCode();
+ hash = (37 * hash) + APPNAME_FIELD_NUMBER;
+ hash = (53 * hash) + getAppName().hashCode();
+ hash = (37 * hash) + AGENT_FIELD_NUMBER;
+ hash = (53 * hash) + getAgent().hashCode();
+ hash = (37 * hash) + SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getSource().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static run.mone.local.docean.protobuf.BeatInfoData parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(run.mone.local.docean.protobuf.BeatInfoData prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code run.mone.local.docean.protobuf.BeatInfoData}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builderstring serviceName = 1;
+ * @return The serviceName.
+ */
+ public java.lang.String getServiceName() {
+ java.lang.Object ref = serviceName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string serviceName = 1;
+ * @return The bytes for serviceName.
+ */
+ public com.google.protobuf.ByteString
+ getServiceNameBytes() {
+ java.lang.Object ref = serviceName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ serviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string serviceName = 1;
+ * @param value The serviceName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serviceName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string serviceName = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearServiceName() {
+
+ serviceName_ = getDefaultInstance().getServiceName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string serviceName = 1;
+ * @param value The bytes for serviceName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServiceNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ serviceName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object namespaceId_ = "";
+ /**
+ * string namespaceId = 2;
+ * @return The namespaceId.
+ */
+ public java.lang.String getNamespaceId() {
+ java.lang.Object ref = namespaceId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ namespaceId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string namespaceId = 2;
+ * @return The bytes for namespaceId.
+ */
+ public com.google.protobuf.ByteString
+ getNamespaceIdBytes() {
+ java.lang.Object ref = namespaceId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ namespaceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string namespaceId = 2;
+ * @param value The namespaceId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNamespaceId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ namespaceId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string namespaceId = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespaceId() {
+
+ namespaceId_ = getDefaultInstance().getNamespaceId();
+ onChanged();
+ return this;
+ }
+ /**
+ * string namespaceId = 2;
+ * @param value The bytes for namespaceId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNamespaceIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ namespaceId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object clusterName_ = "";
+ /**
+ * string clusterName = 3;
+ * @return The clusterName.
+ */
+ public java.lang.String getClusterName() {
+ java.lang.Object ref = clusterName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clusterName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string clusterName = 3;
+ * @return The bytes for clusterName.
+ */
+ public com.google.protobuf.ByteString
+ getClusterNameBytes() {
+ java.lang.Object ref = clusterName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ clusterName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string clusterName = 3;
+ * @param value The clusterName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClusterName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ clusterName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string clusterName = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearClusterName() {
+
+ clusterName_ = getDefaultInstance().getClusterName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string clusterName = 3;
+ * @param value The bytes for clusterName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClusterNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ clusterName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object ip_ = "";
+ /**
+ * string ip = 4;
+ * @return The ip.
+ */
+ public java.lang.String getIp() {
+ java.lang.Object ref = ip_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ ip_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string ip = 4;
+ * @return The bytes for ip.
+ */
+ public com.google.protobuf.ByteString
+ getIpBytes() {
+ java.lang.Object ref = ip_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ ip_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string ip = 4;
+ * @param value The ip to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIp(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ ip_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string ip = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearIp() {
+
+ ip_ = getDefaultInstance().getIp();
+ onChanged();
+ return this;
+ }
+ /**
+ * string ip = 4;
+ * @param value The bytes for ip to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIpBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ ip_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int port_ ;
+ /**
+ * int32 port = 5;
+ * @return The port.
+ */
+ @java.lang.Override
+ public int getPort() {
+ return port_;
+ }
+ /**
+ * int32 port = 5;
+ * @param value The port to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPort(int value) {
+
+ port_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 port = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearPort() {
+
+ port_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object beat_ = "";
+ /**
+ * string beat = 6;
+ * @return The beat.
+ */
+ public java.lang.String getBeat() {
+ java.lang.Object ref = beat_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ beat_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string beat = 6;
+ * @return The bytes for beat.
+ */
+ public com.google.protobuf.ByteString
+ getBeatBytes() {
+ java.lang.Object ref = beat_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ beat_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string beat = 6;
+ * @param value The beat to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBeat(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ beat_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string beat = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearBeat() {
+
+ beat_ = getDefaultInstance().getBeat();
+ onChanged();
+ return this;
+ }
+ /**
+ * string beat = 6;
+ * @param value The bytes for beat to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBeatBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ beat_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object appName_ = "";
+ /**
+ * string appName = 7;
+ * @return The appName.
+ */
+ public java.lang.String getAppName() {
+ java.lang.Object ref = appName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ appName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string appName = 7;
+ * @return The bytes for appName.
+ */
+ public com.google.protobuf.ByteString
+ getAppNameBytes() {
+ java.lang.Object ref = appName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ appName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string appName = 7;
+ * @param value The appName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAppName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ appName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string appName = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearAppName() {
+
+ appName_ = getDefaultInstance().getAppName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string appName = 7;
+ * @param value The bytes for appName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAppNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ appName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object agent_ = "";
+ /**
+ * string agent = 8;
+ * @return The agent.
+ */
+ public java.lang.String getAgent() {
+ java.lang.Object ref = agent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ agent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string agent = 8;
+ * @return The bytes for agent.
+ */
+ public com.google.protobuf.ByteString
+ getAgentBytes() {
+ java.lang.Object ref = agent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ agent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string agent = 8;
+ * @param value The agent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAgent(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ agent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string agent = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearAgent() {
+
+ agent_ = getDefaultInstance().getAgent();
+ onChanged();
+ return this;
+ }
+ /**
+ * string agent = 8;
+ * @param value The bytes for agent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAgentBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ agent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object source_ = "";
+ /**
+ * string source = 9;
+ * @return The source.
+ */
+ public java.lang.String getSource() {
+ java.lang.Object ref = source_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ source_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string source = 9;
+ * @return The bytes for source.
+ */
+ public com.google.protobuf.ByteString
+ getSourceBytes() {
+ java.lang.Object ref = source_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ source_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string source = 9;
+ * @param value The source to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSource(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ source_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string source = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearSource() {
+
+ source_ = getDefaultInstance().getSource();
+ onChanged();
+ return this;
+ }
+ /**
+ * string source = 9;
+ * @param value The bytes for source to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourceBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ source_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:run.mone.local.docean.protobuf.BeatInfoData)
+ }
+
+ // @@protoc_insertion_point(class_scope:run.mone.local.docean.protobuf.BeatInfoData)
+ private static final run.mone.local.docean.protobuf.BeatInfoData DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new run.mone.local.docean.protobuf.BeatInfoData();
+ }
+
+ public static run.mone.local.docean.protobuf.BeatInfoData getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parserstring serviceName = 1;
+ * @return The serviceName.
+ */
+ java.lang.String getServiceName();
+ /**
+ * string serviceName = 1;
+ * @return The bytes for serviceName.
+ */
+ com.google.protobuf.ByteString
+ getServiceNameBytes();
+
+ /**
+ * string namespaceId = 2;
+ * @return The namespaceId.
+ */
+ java.lang.String getNamespaceId();
+ /**
+ * string namespaceId = 2;
+ * @return The bytes for namespaceId.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceIdBytes();
+
+ /**
+ * string clusterName = 3;
+ * @return The clusterName.
+ */
+ java.lang.String getClusterName();
+ /**
+ * string clusterName = 3;
+ * @return The bytes for clusterName.
+ */
+ com.google.protobuf.ByteString
+ getClusterNameBytes();
+
+ /**
+ * string ip = 4;
+ * @return The ip.
+ */
+ java.lang.String getIp();
+ /**
+ * string ip = 4;
+ * @return The bytes for ip.
+ */
+ com.google.protobuf.ByteString
+ getIpBytes();
+
+ /**
+ * int32 port = 5;
+ * @return The port.
+ */
+ int getPort();
+
+ /**
+ * string beat = 6;
+ * @return The beat.
+ */
+ java.lang.String getBeat();
+ /**
+ * string beat = 6;
+ * @return The bytes for beat.
+ */
+ com.google.protobuf.ByteString
+ getBeatBytes();
+
+ /**
+ * string appName = 7;
+ * @return The appName.
+ */
+ java.lang.String getAppName();
+ /**
+ * string appName = 7;
+ * @return The bytes for appName.
+ */
+ com.google.protobuf.ByteString
+ getAppNameBytes();
+
+ /**
+ * string agent = 8;
+ * @return The agent.
+ */
+ java.lang.String getAgent();
+ /**
+ * string agent = 8;
+ * @return The bytes for agent.
+ */
+ com.google.protobuf.ByteString
+ getAgentBytes();
+
+ /**
+ * string source = 9;
+ * @return The source.
+ */
+ java.lang.String getSource();
+ /**
+ * string source = 9;
+ * @return The bytes for source.
+ */
+ com.google.protobuf.ByteString
+ getSourceBytes();
+}
diff --git a/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/Bo.java b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/Bo.java
new file mode 100644
index 000000000..c4483ab85
--- /dev/null
+++ b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/Bo.java
@@ -0,0 +1,335 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bo.proto
+
+package run.mone.local.docean.protobuf;
+
+public final class Bo {
+ private Bo() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_HelloRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_HelloRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_ListRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_ListRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_ListResponse_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_ListResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_CheckSum_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_CheckSum_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_CheckSum_DataEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_CheckSum_DataEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_BeatInfoData_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_BeatInfoData_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_DatumMapEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_DatumMapEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_MetadataEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_MetadataEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_InstancesProto_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_InstancesProto_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_InstancesEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_InstancesEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_AiMessage_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_AiMessage_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_AiMessage_MessageMetaEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_AiMessage_MessageMetaEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_AiCmd_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_AiCmd_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_AiCmd_CmdMetaEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_AiCmd_CmdMetaEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_AiResult_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_AiResult_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_AiResult_DataEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_AiResult_DataEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_PingMsg_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_PingMsg_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_run_mone_local_docean_protobuf_PingMsg_PingMetaEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_run_mone_local_docean_protobuf_PingMsg_PingMetaEntry_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\010bo.proto\022\036run.mone.local.docean.protob" +
+ "uf\"3\n\014HelloRequest\022\021\n\tfirstName\030\001 \001(\t\022\020\n" +
+ "\010lastName\030\002 \001(\t\"\335\002\n\013ListRequest\022\023\n\013names" +
+ "paceId\030\001 \001(\t\022\023\n\013serviceName\030\002 \001(\t\022\r\n\005age" +
+ "nt\030\003 \001(\t\022\020\n\010clusters\030\004 \001(\t\022\020\n\010clientIP\030\005" +
+ " \001(\t\022\017\n\007udpPort\030\006 \001(\005\022\013\n\003env\030\007 \001(\t\022\017\n\007is" +
+ "Check\030\010 \001(\010\022\013\n\003app\030\t \001(\t\022\013\n\003tid\030\n \001(\t\022\016\n" +
+ "\006tenant\030\013 \001(\t\022\023\n\013healthyOnly\030\014 \001(\010\022\013\n\003cm" +
+ "d\030\r \001(\t\022\017\n\007cluster\030\016 \001(\t\022\n\n\002ip\030\017 \001(\t\022\014\n\004" +
+ "port\030\020 \001(\005\022\016\n\006pageNo\030\021 \001(\005\022\020\n\010pageSize\030\022" +
+ " \001(\005\022\021\n\tgroupName\030\023 \001(\t\022\026\n\016selectorStrin" +
+ "g\030\024 \001(\t\"\255\001\n\014ListResponse\022\014\n\004data\030\001 \001(\t\022@" +
+ "\n\tinstances\030\002 \003(\0132-.run.mone.local.docea" +
+ "n.protobuf.InstanceProto\022\014\n\004code\030\003 \001(\005\022?" +
+ "\n\010instance\030\004 \001(\0132-.run.mone.local.docean" +
+ ".protobuf.InstanceProto\"y\n\010CheckSum\022@\n\004d" +
+ "ata\030\001 \003(\01322.run.mone.local.docean.protob" +
+ "uf.CheckSum.DataEntry\032+\n\tDataEntry\022\013\n\003ke" +
+ "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\245\001\n\014BeatInfoD" +
+ "ata\022\023\n\013serviceName\030\001 \001(\t\022\023\n\013namespaceId\030" +
+ "\002 \001(\t\022\023\n\013clusterName\030\003 \001(\t\022\n\n\002ip\030\004 \001(\t\022\014" +
+ "\n\004port\030\005 \001(\005\022\014\n\004beat\030\006 \001(\t\022\017\n\007appName\030\007 " +
+ "\001(\t\022\r\n\005agent\030\010 \001(\t\022\016\n\006source\030\t \001(\t\"\275\001\n\014D" +
+ "atumMapData\022L\n\010datumMap\030\001 \003(\0132:.run.mone" +
+ ".local.docean.protobuf.DatumMapData.Datu" +
+ "mMapEntry\032_\n\rDatumMapEntry\022\013\n\003key\030\001 \001(\t\022" +
+ "=\n\005value\030\002 \001(\0132..run.mone.local.docean.p" +
+ "rotobuf.InstancesProto:\0028\001\"\213\003\n\rInstanceP" +
+ "roto\022\013\n\003key\030\001 \001(\t\022\021\n\ttimestamp\030\002 \001(\003\022\020\n\010" +
+ "lastBeat\030\003 \001(\003\022\016\n\006marked\030\004 \001(\010\022\016\n\006tenant" +
+ "\030\005 \001(\t\022\013\n\003app\030\006 \001(\t\022\022\n\ninstanceId\030\007 \001(\t\022" +
+ "\n\n\002ip\030\010 \001(\t\022\014\n\004port\030\t \001(\005\022\016\n\006weight\030\n \001(" +
+ "\001\022\017\n\007healthy\030\013 \001(\010\022\017\n\007enabled\030\014 \001(\010\022\021\n\te" +
+ "phemeral\030\r \001(\010\022\023\n\013clusterName\030\016 \001(\t\022\023\n\013s" +
+ "erviceName\030\017 \001(\t\022M\n\010metadata\030\020 \003(\0132;.run" +
+ ".mone.local.docean.protobuf.InstanceProt" +
+ "o.MetadataEntry\032/\n\rMetadataEntry\022\013\n\003key\030" +
+ "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"r\n\016InstancesPro" +
+ "to\022@\n\tinstances\030\001 \003(\0132-.run.mone.local.d" +
+ "ocean.protobuf.InstanceProto\022\013\n\003key\030\002 \001(" +
+ "\t\022\021\n\ttimestamp\030\003 \001(\003\"\226\003\n\rNacosReqProto\022\013" +
+ "\n\003cmd\030\001 \001(\t\022>\n\010beatinfo\030\002 \001(\0132,.run.mone" +
+ ".local.docean.protobuf.BeatInfoData\022\014\n\004f" +
+ "rom\030\003 \001(\t\022:\n\010checkSum\030\004 \001(\0132(.run.mone.l" +
+ "ocal.docean.protobuf.CheckSum\022\030\n\020showErr" +
+ "orMessage\030\005 \001(\010\022\016\n\006source\030\006 \001(\t\022\021\n\tdatum" +
+ "Keys\030\007 \003(\t\022O\n\tinstances\030\010 \003(\0132<.run.mone" +
+ ".local.docean.protobuf.NacosReqProto.Ins" +
+ "tancesEntry\032`\n\016InstancesEntry\022\013\n\003key\030\001 \001" +
+ "(\t\022=\n\005value\030\002 \001(\0132..run.mone.local.docea" +
+ "n.protobuf.InstancesProto:\0028\001\"\344\001\n\tAiMess" +
+ "age\022\013\n\003cmd\030\001 \001(\t\022O\n\013messageMeta\030\002 \003(\0132:." +
+ "run.mone.local.docean.protobuf.AiMessage" +
+ ".MessageMetaEntry\022\017\n\007message\030\003 \001(\t\022\014\n\004ti" +
+ "me\030\004 \001(\003\022\014\n\004data\030\005 \001(\t\022\014\n\004from\030\006 \001(\t\022\n\n\002" +
+ "to\030\007 \001(\t\0322\n\020MessageMetaEntry\022\013\n\003key\030\001 \001(" +
+ "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\211\001\n\005AiCmd\022\013\n\003cmd\030\001 " +
+ "\001(\t\022C\n\007cmdMeta\030\002 \003(\01322.run.mone.local.do" +
+ "cean.protobuf.AiCmd.CmdMetaEntry\032.\n\014CmdM" +
+ "etaEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" +
+ "\"\230\001\n\010AiResult\022\014\n\004code\030\001 \001(\005\022\017\n\007message\030\002" +
+ " \001(\t\022@\n\004data\030\003 \003(\01322.run.mone.local.doce" +
+ "an.protobuf.AiResult.DataEntry\032+\n\tDataEn" +
+ "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\300\001\n\007" +
+ "PingMsg\022\020\n\010userName\030\001 \001(\t\022\014\n\004role\030\002 \001(\t\022" +
+ "\014\n\004time\030\003 \001(\003\022\r\n\005alias\030\004 \001(\t\022G\n\010pingMeta" +
+ "\030\005 \003(\01325.run.mone.local.docean.protobuf." +
+ "PingMsg.PingMetaEntry\032/\n\rPingMetaEntry\022\013" +
+ "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\002P\001b\006prot" +
+ "o3"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ });
+ internal_static_run_mone_local_docean_protobuf_HelloRequest_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_HelloRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_HelloRequest_descriptor,
+ new java.lang.String[] { "FirstName", "LastName", });
+ internal_static_run_mone_local_docean_protobuf_ListRequest_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_run_mone_local_docean_protobuf_ListRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_ListRequest_descriptor,
+ new java.lang.String[] { "NamespaceId", "ServiceName", "Agent", "Clusters", "ClientIP", "UdpPort", "Env", "IsCheck", "App", "Tid", "Tenant", "HealthyOnly", "Cmd", "Cluster", "Ip", "Port", "PageNo", "PageSize", "GroupName", "SelectorString", });
+ internal_static_run_mone_local_docean_protobuf_ListResponse_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_run_mone_local_docean_protobuf_ListResponse_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_ListResponse_descriptor,
+ new java.lang.String[] { "Data", "Instances", "Code", "Instance", });
+ internal_static_run_mone_local_docean_protobuf_CheckSum_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_run_mone_local_docean_protobuf_CheckSum_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_CheckSum_descriptor,
+ new java.lang.String[] { "Data", });
+ internal_static_run_mone_local_docean_protobuf_CheckSum_DataEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_CheckSum_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_CheckSum_DataEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_CheckSum_DataEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_run_mone_local_docean_protobuf_BeatInfoData_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_run_mone_local_docean_protobuf_BeatInfoData_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_BeatInfoData_descriptor,
+ new java.lang.String[] { "ServiceName", "NamespaceId", "ClusterName", "Ip", "Port", "Beat", "AppName", "Agent", "Source", });
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_descriptor,
+ new java.lang.String[] { "DatumMap", });
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_DatumMapEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_DatumMapEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_DatumMapData_DatumMapEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_descriptor,
+ new java.lang.String[] { "Key", "Timestamp", "LastBeat", "Marked", "Tenant", "App", "InstanceId", "Ip", "Port", "Weight", "Healthy", "Enabled", "Ephemeral", "ClusterName", "ServiceName", "Metadata", });
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_MetadataEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_MetadataEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_InstanceProto_MetadataEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_run_mone_local_docean_protobuf_InstancesProto_descriptor =
+ getDescriptor().getMessageTypes().get(7);
+ internal_static_run_mone_local_docean_protobuf_InstancesProto_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_InstancesProto_descriptor,
+ new java.lang.String[] { "Instances", "Key", "Timestamp", });
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_descriptor =
+ getDescriptor().getMessageTypes().get(8);
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_descriptor,
+ new java.lang.String[] { "Cmd", "Beatinfo", "From", "CheckSum", "ShowErrorMessage", "Source", "DatumKeys", "Instances", });
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_InstancesEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_InstancesEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_NacosReqProto_InstancesEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_run_mone_local_docean_protobuf_AiMessage_descriptor =
+ getDescriptor().getMessageTypes().get(9);
+ internal_static_run_mone_local_docean_protobuf_AiMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_AiMessage_descriptor,
+ new java.lang.String[] { "Cmd", "MessageMeta", "Message", "Time", "Data", "From", "To", });
+ internal_static_run_mone_local_docean_protobuf_AiMessage_MessageMetaEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_AiMessage_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_AiMessage_MessageMetaEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_AiMessage_MessageMetaEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_run_mone_local_docean_protobuf_AiCmd_descriptor =
+ getDescriptor().getMessageTypes().get(10);
+ internal_static_run_mone_local_docean_protobuf_AiCmd_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_AiCmd_descriptor,
+ new java.lang.String[] { "Cmd", "CmdMeta", });
+ internal_static_run_mone_local_docean_protobuf_AiCmd_CmdMetaEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_AiCmd_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_AiCmd_CmdMetaEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_AiCmd_CmdMetaEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_run_mone_local_docean_protobuf_AiResult_descriptor =
+ getDescriptor().getMessageTypes().get(11);
+ internal_static_run_mone_local_docean_protobuf_AiResult_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_AiResult_descriptor,
+ new java.lang.String[] { "Code", "Message", "Data", });
+ internal_static_run_mone_local_docean_protobuf_AiResult_DataEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_AiResult_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_AiResult_DataEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_AiResult_DataEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_run_mone_local_docean_protobuf_PingMsg_descriptor =
+ getDescriptor().getMessageTypes().get(12);
+ internal_static_run_mone_local_docean_protobuf_PingMsg_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_PingMsg_descriptor,
+ new java.lang.String[] { "UserName", "Role", "Time", "Alias", "PingMeta", });
+ internal_static_run_mone_local_docean_protobuf_PingMsg_PingMetaEntry_descriptor =
+ internal_static_run_mone_local_docean_protobuf_PingMsg_descriptor.getNestedTypes().get(0);
+ internal_static_run_mone_local_docean_protobuf_PingMsg_PingMetaEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_run_mone_local_docean_protobuf_PingMsg_PingMetaEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/CheckSum.java b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/CheckSum.java
new file mode 100644
index 000000000..16222f23e
--- /dev/null
+++ b/m78-all/Tianye/Tianye-api/src/main/java/run/mone/local/docean/protobuf/CheckSum.java
@@ -0,0 +1,708 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bo.proto
+
+package run.mone.local.docean.protobuf;
+
+/**
+ * Protobuf type {@code run.mone.local.docean.protobuf.CheckSum}
+ */
+public final class CheckSum extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:run.mone.local.docean.protobuf.CheckSum)
+ CheckSumOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use CheckSum.newBuilder() to construct.
+ private CheckSum(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private CheckSum() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new CheckSum();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CheckSum(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ data_ = com.google.protobuf.MapField.newMapField(
+ DataDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000001;
+ }
+ com.google.protobuf.MapEntrymap<string, string> data = 1;
+ */
+
+ @java.lang.Override
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 1;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> data = 1;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> data = 1;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> data = 1;
+ */
+
+ @java.lang.Override
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 1;
+ */
+ @java.lang.Override
+
+ public java.util.Mapmap<string, string> data = 1;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> data = 1;
+ */
+ @java.lang.Override
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Mapmap<string, string> data = 1;
+ */
+
+ public Builder removeData(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ internalGetMutableData().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 1;
+ */
+ public Builder putData(
+ java.lang.String key,
+ java.lang.String value) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ if (value == null) {
+ throw new NullPointerException("map value");
+}
+
+ internalGetMutableData().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * map<string, string> data = 1;
+ */
+
+ public Builder putAllData(
+ java.util.Map