From 8b4a1fb09525c718f474e3f16f7fa74e3fbc606d Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Fri, 7 Feb 2020 14:41:44 +0800 Subject: [PATCH] refactor: rename method name --- .../ast/ast_java/ast_java_target_handler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/infrastructure/ast/ast_java/ast_java_target_handler.go b/pkg/infrastructure/ast/ast_java/ast_java_target_handler.go index 4bd38b4..c0325bf 100644 --- a/pkg/infrastructure/ast/ast_java/ast_java_target_handler.go +++ b/pkg/infrastructure/ast/ast_java/ast_java_target_handler.go @@ -93,19 +93,19 @@ func HandleEmptyFullType(ctx *parser.MethodCallContext, targetType string, metho targetType = clz } else { targetType = buildSelfThisTarget(targetType) - targetType = BuildMethodNameForBuilder(ctx, targetType) + targetType = buildMethodNameForBuilder(ctx, targetType) } return targetType, packageName } -func BuildMethodNameForBuilder(ctx *parser.MethodCallContext, targetType string) string { +func buildMethodNameForBuilder(ctx *parser.MethodCallContext, targetType string) string { switch parentCtx := ctx.GetParent().(type) { case *parser.ExpressionContext: switch parentParentCtx := parentCtx.GetParent().(type) { case *parser.VariableInitializerContext: switch varDeclCtx := parentParentCtx.GetParent().(type) { case *parser.VariableDeclaratorContext: - targetType = GetTargetFromVarDecl(varDeclCtx, targetType) + targetType = getTargetFromVarDecl(varDeclCtx, targetType) } } } @@ -113,7 +113,7 @@ func BuildMethodNameForBuilder(ctx *parser.MethodCallContext, targetType string) return targetType } -func GetTargetFromVarDecl(ctx *parser.VariableDeclaratorContext, targetType string) string { +func getTargetFromVarDecl(ctx *parser.VariableDeclaratorContext, targetType string) string { switch x := ctx.GetParent().(type) { case *parser.VariableDeclaratorsContext: switch parentType := x.GetParent().(type) { -- GitLab