Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Phodal
Coca
提交
ef6358cc
C
Coca
项目概览
Phodal
/
Coca
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coca
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ef6358cc
编写于
1月 16, 2020
作者:
P
Phodal Huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: keep identifier & ds:
上级
6280dfc5
变更
16
显示空白变更内容
内联
并排
Showing
16 changed file
with
81 addition
and
81 deletion
+81
-81
cmd/analysis.go
cmd/analysis.go
+1
-1
cmd/deps.go
cmd/deps.go
+1
-1
cmd/rcall.go
cmd/rcall.go
+1
-1
cmd/tbs.go
cmd/tbs.go
+1
-1
cocatest/testhelper/generate.go
cocatest/testhelper/generate.go
+1
-1
pkg/adapter/cocafile/file_analysis_helper_test.go
pkg/adapter/cocafile/file_analysis_helper_test.go
+1
-1
pkg/application/analysis/java_full_app_test.go
pkg/application/analysis/java_full_app_test.go
+2
-2
pkg/application/analysis/java_identifier_app_test.go
pkg/application/analysis/java_identifier_app_test.go
+13
-13
pkg/application/evaluate/analyser.go
pkg/application/evaluate/analyser.go
+2
-2
pkg/application/evaluate/evaluator/null_exception.go
pkg/application/evaluate/evaluator/null_exception.go
+2
-2
pkg/application/refactor/rename/rename_method_test.go
pkg/application/refactor/rename/rename_method_test.go
+1
-1
pkg/application/tbs/tbs_app_test.go
pkg/application/tbs/tbs_app_test.go
+1
-1
pkg/domain/core_domain/code_data_struct.go
pkg/domain/core_domain/code_data_struct.go
+43
-0
pkg/domain/core_domain/jidentifier.go
pkg/domain/core_domain/jidentifier.go
+0
-43
pkg/infrastructure/ast/api/java_api_listener.go
pkg/infrastructure/ast/api/java_api_listener.go
+1
-1
pkg/infrastructure/ast/identifier/java_identifier_listener.go
...infrastructure/ast/identifier/java_identifier_listener.go
+10
-10
未找到文件。
cmd/analysis.go
浏览文件 @
ef6358cc
...
...
@@ -32,7 +32,7 @@ var analysisCmd = &cobra.Command{
var
classes
[]
string
=
nil
for
_
,
node
:=
range
iNodes
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
callApp
:=
analysis
.
NewJavaFullApp
()
...
...
cmd/deps.go
浏览文件 @
ef6358cc
...
...
@@ -40,7 +40,7 @@ var depsCmd = &cobra.Command{
var
classes
[]
string
=
nil
for
_
,
node
:=
range
iNodes
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
callApp
:=
analysis
.
NewJavaFullApp
()
...
...
cmd/rcall.go
浏览文件 @
ef6358cc
...
...
@@ -31,7 +31,7 @@ var reverseCmd = &cobra.Command{
remove
:=
reverseConfig
.
RemovePackage
if
className
==
""
{
log
.
Fatal
(
"lost
Class
Name"
)
log
.
Fatal
(
"lost
Node
Name"
)
}
analyser
:=
rcall
.
NewRCallGraph
()
...
...
cmd/tbs.go
浏览文件 @
ef6358cc
...
...
@@ -33,7 +33,7 @@ var tbsCmd = &cobra.Command{
var
classes
[]
string
=
nil
for
_
,
node
:=
range
identifiers
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
analysisApp
:=
analysis
.
NewJavaFullApp
()
...
...
cocatest/testhelper/generate.go
浏览文件 @
ef6358cc
...
...
@@ -13,7 +13,7 @@ func BuildAnalysisDeps(codePath string) ([]core_domain.CodeDataStruct, map[strin
identifiers
:=
identifierApp
.
AnalysisPath
(
codePath
)
var
classes
[]
string
=
nil
for
_
,
node
:=
range
identifiers
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
callApp
:=
analysis
.
NewJavaFullApp
()
...
...
pkg/adapter/cocafile/file_analysis_helper_test.go
浏览文件 @
ef6358cc
...
...
@@ -29,5 +29,5 @@ public class DataClass {
antlr
.
NewParseTreeWalker
()
.
Walk
(
listener
,
context
)
identifiers
:=
listener
.
GetNodes
()
g
.
Expect
(
identifiers
[
0
]
.
Class
Name
)
.
To
(
Equal
(
"DataClass"
))
g
.
Expect
(
identifiers
[
0
]
.
Node
Name
)
.
To
(
Equal
(
"DataClass"
))
}
pkg/application/analysis/java_full_app_test.go
浏览文件 @
ef6358cc
...
...
@@ -17,7 +17,7 @@ func TestJavaCallApp_AnalysisPath(t *testing.T) {
iNodes
:=
identifierApp
.
AnalysisPath
(
codePath
)
var
classes
[]
string
=
nil
for
_
,
node
:=
range
iNodes
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
callApp
:=
NewJavaFullApp
()
...
...
@@ -41,7 +41,7 @@ func getCallNodes(codePath string) []core_domain.CodeDataStruct {
iNodes
:=
identifierApp
.
AnalysisPath
(
codePath
)
var
classes
[]
string
=
nil
for
_
,
node
:=
range
iNodes
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
callApp
:=
NewJavaFullApp
()
...
...
pkg/application/analysis/java_identifier_app_test.go
浏览文件 @
ef6358cc
...
...
@@ -13,9 +13,9 @@ func TestJavaIdentifierApp_AnalysisPath(t *testing.T) {
identifiers
:=
identApp
.
AnalysisPath
(
filepath
.
FromSlash
(
"../../../_fixtures/call"
))
g
.
Expect
(
len
(
identifiers
))
.
To
(
Equal
(
1
))
g
.
Expect
(
identifiers
[
0
]
.
Class
Name
)
.
To
(
Equal
(
"BookController"
))
g
.
Expect
(
identifiers
[
0
]
.
Method
s
[
0
]
.
Name
)
.
To
(
Equal
(
"BookController"
))
g
.
Expect
(
identifiers
[
0
]
.
Method
s
[
1
]
.
Name
)
.
To
(
Equal
(
"createBook"
))
g
.
Expect
(
identifiers
[
0
]
.
Node
Name
)
.
To
(
Equal
(
"BookController"
))
g
.
Expect
(
identifiers
[
0
]
.
Function
s
[
0
]
.
Name
)
.
To
(
Equal
(
"BookController"
))
g
.
Expect
(
identifiers
[
0
]
.
Function
s
[
1
]
.
Name
)
.
To
(
Equal
(
"createBook"
))
g
.
Expect
(
identifiers
[
0
]
.
Annotations
[
0
]
.
Name
)
.
To
(
Equal
(
"RestController"
))
}
...
...
@@ -27,8 +27,8 @@ func TestPolymorphism_Method(t *testing.T) {
identifiers
:=
identApp
.
AnalysisPath
(
filepath
.
FromSlash
(
"../../../_fixtures/suggest/polymorphism"
))
g
.
Expect
(
len
(
identifiers
))
.
To
(
Equal
(
1
))
g
.
Expect
(
identifiers
[
0
]
.
Class
Name
)
.
To
(
Equal
(
"Overload"
))
g
.
Expect
(
len
(
identifiers
[
0
]
.
Method
s
))
.
To
(
Equal
(
3
))
g
.
Expect
(
identifiers
[
0
]
.
Node
Name
)
.
To
(
Equal
(
"Overload"
))
g
.
Expect
(
len
(
identifiers
[
0
]
.
Function
s
))
.
To
(
Equal
(
3
))
}
func
TestPolymorphism_Constructor
(
t
*
testing
.
T
)
{
...
...
@@ -38,8 +38,8 @@ func TestPolymorphism_Constructor(t *testing.T) {
identifiers
:=
identApp
.
AnalysisPath
(
filepath
.
FromSlash
(
"../../../_fixtures/suggest/factory"
))
g
.
Expect
(
len
(
identifiers
))
.
To
(
Equal
(
2
))
g
.
Expect
(
identifiers
[
0
]
.
Class
Name
)
.
To
(
Equal
(
"Insect"
))
g
.
Expect
(
identifiers
[
1
]
.
Class
Name
)
.
To
(
Equal
(
"Bee"
))
g
.
Expect
(
identifiers
[
0
]
.
Node
Name
)
.
To
(
Equal
(
"Insect"
))
g
.
Expect
(
identifiers
[
1
]
.
Node
Name
)
.
To
(
Equal
(
"Bee"
))
}
func
TestAddReturnNull
(
t
*
testing
.
T
)
{
...
...
@@ -49,14 +49,14 @@ func TestAddReturnNull(t *testing.T) {
identifiers
:=
identApp
.
AnalysisPath
(
filepath
.
FromSlash
(
"../../../_fixtures/evaluate/null"
))
var
returNullCount
=
0
for
_
,
method
:=
range
identifiers
[
0
]
.
Method
s
{
for
_
,
method
:=
range
identifiers
[
0
]
.
Function
s
{
if
method
.
IsReturnNull
{
returNullCount
++
}
}
g
.
Expect
(
identifiers
[
0
]
.
Method
s
[
1
]
.
IsReturnNull
)
.
To
(
Equal
(
true
))
g
.
Expect
(
identifiers
[
0
]
.
Method
s
[
2
]
.
IsReturnNull
)
.
To
(
Equal
(
true
))
g
.
Expect
(
identifiers
[
0
]
.
Function
s
[
1
]
.
IsReturnNull
)
.
To
(
Equal
(
true
))
g
.
Expect
(
identifiers
[
0
]
.
Function
s
[
2
]
.
IsReturnNull
)
.
To
(
Equal
(
true
))
g
.
Expect
(
returNullCount
)
.
To
(
Equal
(
2
))
}
...
...
@@ -66,8 +66,8 @@ func TestStaticMethod(t *testing.T) {
identApp
:=
NewJavaIdentifierApp
()
identifiers
:=
identApp
.
AnalysisPath
(
filepath
.
FromSlash
(
"../../../_fixtures/suggest/static"
))
g
.
Expect
(
identifiers
[
0
]
.
Method
s
[
0
]
.
Modifiers
[
0
])
.
To
(
Equal
(
"public"
))
g
.
Expect
(
identifiers
[
0
]
.
Method
s
[
0
]
.
Modifiers
[
1
])
.
To
(
Equal
(
"static"
))
g
.
Expect
(
identifiers
[
0
]
.
Function
s
[
0
]
.
Modifiers
[
0
])
.
To
(
Equal
(
"public"
))
g
.
Expect
(
identifiers
[
0
]
.
Function
s
[
0
]
.
Modifiers
[
1
])
.
To
(
Equal
(
"static"
))
}
func
TestModifierLength
(
t
*
testing
.
T
)
{
...
...
@@ -76,5 +76,5 @@ func TestModifierLength(t *testing.T) {
identApp
:=
NewJavaIdentifierApp
()
identifiers
:=
identApp
.
AnalysisPath
(
filepath
.
FromSlash
(
"../../../_fixtures/bs/ComplexIf.java"
))
g
.
Expect
(
len
(
identifiers
[
0
]
.
Method
s
[
0
]
.
Modifiers
))
.
To
(
Equal
(
1
))
g
.
Expect
(
len
(
identifiers
[
0
]
.
Function
s
[
0
]
.
Modifiers
))
.
To
(
Equal
(
1
))
}
pkg/application/evaluate/analyser.go
浏览文件 @
ef6358cc
...
...
@@ -54,9 +54,9 @@ func SummaryMethodIdentifier(identifiers []core_domain.JIdentifier, result *eval
for
_
,
ident
:=
range
identifiers
{
result
.
Summary
.
ClassCount
++
methodCountArray
=
append
(
methodCountArray
,
float64
(
len
(
ident
.
Method
s
)))
methodCountArray
=
append
(
methodCountArray
,
float64
(
len
(
ident
.
Function
s
)))
for
_
,
method
:=
range
ident
.
Method
s
{
for
_
,
method
:=
range
ident
.
Function
s
{
result
.
Summary
.
MethodCount
++
if
method
.
IsStatic
()
{
...
...
pkg/application/evaluate/evaluator/null_exception.go
浏览文件 @
ef6358cc
...
...
@@ -15,7 +15,7 @@ func (n NullPointException) EvaluateList(evaluateModel *EvaluateModel, nodes []c
var
nullableList
[]
string
=
nil
var
nullableMap
=
make
(
map
[
string
]
string
)
for
_
,
ident
:=
range
identifiers
{
for
_
,
method
:=
range
ident
.
Method
s
{
for
_
,
method
:=
range
ident
.
Function
s
{
methodName
:=
buildMethodPath
(
ident
,
method
)
if
method
.
IsReturnNull
{
nullableMap
[
methodName
]
=
methodName
...
...
@@ -37,5 +37,5 @@ func (n NullPointException) EvaluateList(evaluateModel *EvaluateModel, nodes []c
}
func
buildMethodPath
(
ident
core_domain
.
JIdentifier
,
method
core_domain
.
CodeFunction
)
string
{
return
ident
.
Package
+
"."
+
ident
.
Class
Name
+
"."
+
method
.
Name
return
ident
.
Package
+
"."
+
ident
.
Node
Name
+
"."
+
method
.
Name
}
pkg/application/refactor/rename/rename_method_test.go
浏览文件 @
ef6358cc
...
...
@@ -21,7 +21,7 @@ func TestRenameMethodApp(t *testing.T) {
identifiers
:=
identifierApp
.
AnalysisPath
(
codePath
)
var
classes
[]
string
=
nil
for
_
,
node
:=
range
identifiers
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
callApp
:=
analysis
.
NewJavaFullApp
()
...
...
pkg/application/tbs/tbs_app_test.go
浏览文件 @
ef6358cc
...
...
@@ -147,7 +147,7 @@ func BuildTestAnalysisResultsByPath(codePath string) (map[string]core_domain.JId
var
classes
[]
string
=
nil
for
_
,
node
:=
range
identifiers
{
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Class
Name
)
classes
=
append
(
classes
,
node
.
Package
+
"."
+
node
.
Node
Name
)
}
analysisApp
:=
analysis
.
NewJavaFullApp
()
...
...
pkg/domain/core_domain/code_data_struct.go
浏览文件 @
ef6358cc
...
...
@@ -21,6 +21,16 @@ type CodeDataStruct struct {
Extension
interface
{}
}
type
JIdentifier
struct
{
NodeName
string
Package
string
Type
string
Extend
string
Implements
[]
string
Functions
[]
CodeFunction
Annotations
[]
CodeAnnotation
}
func
NewDataStruct
()
*
CodeDataStruct
{
return
&
CodeDataStruct
{}
}
...
...
@@ -61,3 +71,36 @@ func BuildCallMethodMap(deps []CodeDataStruct) map[string]CodeFunction {
}
return
callMethodMap
}
func
NewJIdentifier
()
*
JIdentifier
{
return
&
JIdentifier
{}
}
func
(
identifier
*
JIdentifier
)
GetClassFullName
()
string
{
return
identifier
.
Package
+
"."
+
identifier
.
NodeName
}
func
BuildIdentifierMap
(
identifiers
[]
JIdentifier
)
map
[
string
]
JIdentifier
{
var
identifiersMap
=
make
(
map
[
string
]
JIdentifier
)
for
_
,
ident
:=
range
identifiers
{
identifiersMap
[
ident
.
Package
+
"."
+
ident
.
NodeName
]
=
ident
}
return
identifiersMap
}
func
BuildDIMap
(
identifiers
[]
JIdentifier
,
identifierMap
map
[
string
]
JIdentifier
)
map
[
string
]
string
{
var
diMap
=
make
(
map
[
string
]
string
)
for
_
,
clz
:=
range
identifiers
{
if
len
(
clz
.
Annotations
)
>
0
{
for
_
,
annotation
:=
range
clz
.
Annotations
{
if
(
annotation
.
IsComponentOrRepository
())
&&
len
(
clz
.
Implements
)
>
0
{
superClz
:=
identifierMap
[
clz
.
Implements
[
0
]]
diMap
[
superClz
.
GetClassFullName
()]
=
superClz
.
GetClassFullName
()
}
}
}
}
return
diMap
}
pkg/domain/core_domain/jidentifier.go
浏览文件 @
ef6358cc
package
core_domain
type
JIdentifier
struct
{
Package
string
ClassName
string
ClassType
string
ExtendsName
string
Extends
[]
string
Implements
[]
string
Methods
[]
CodeFunction
Annotations
[]
CodeAnnotation
}
func
NewJIdentifier
()
*
JIdentifier
{
return
&
JIdentifier
{}
}
func
(
identifier
*
JIdentifier
)
GetClassFullName
()
string
{
return
identifier
.
Package
+
"."
+
identifier
.
ClassName
}
func
BuildIdentifierMap
(
identifiers
[]
JIdentifier
)
map
[
string
]
JIdentifier
{
var
identifiersMap
=
make
(
map
[
string
]
JIdentifier
)
for
_
,
ident
:=
range
identifiers
{
identifiersMap
[
ident
.
Package
+
"."
+
ident
.
ClassName
]
=
ident
}
return
identifiersMap
}
func
BuildDIMap
(
identifiers
[]
JIdentifier
,
identifierMap
map
[
string
]
JIdentifier
)
map
[
string
]
string
{
var
diMap
=
make
(
map
[
string
]
string
)
for
_
,
clz
:=
range
identifiers
{
if
len
(
clz
.
Annotations
)
>
0
{
for
_
,
annotation
:=
range
clz
.
Annotations
{
if
(
annotation
.
IsComponentOrRepository
())
&&
len
(
clz
.
Implements
)
>
0
{
superClz
:=
identifierMap
[
clz
.
Implements
[
0
]]
diMap
[
superClz
.
GetClassFullName
()]
=
superClz
.
GetClassFullName
()
}
}
}
}
return
diMap
}
pkg/infrastructure/ast/api/java_api_listener.go
浏览文件 @
ef6358cc
...
...
@@ -220,7 +220,7 @@ func buildApiForInterfaceAnnotation(methodName string) bool {
}
if
_
,
ok
:=
identMap
[
superClz
];
ok
{
for
_
,
method
:=
range
identMap
[
superClz
]
.
Method
s
{
for
_
,
method
:=
range
identMap
[
superClz
]
.
Function
s
{
if
method
.
Name
==
methodName
{
for
_
,
annotation
:=
range
method
.
Annotations
{
if
annotation
.
Name
==
"ServiceMethod"
{
...
...
pkg/infrastructure/ast/identifier/java_identifier_listener.go
浏览文件 @
ef6358cc
...
...
@@ -39,13 +39,13 @@ func (s *JavaIdentifierListener) EnterPackageDeclaration(ctx *parser.PackageDecl
func
(
s
*
JavaIdentifierListener
)
EnterClassDeclaration
(
ctx
*
parser
.
ClassDeclarationContext
)
{
hasEnterClass
=
true
currentNode
.
Class
Type
=
"NodeName"
currentNode
.
Type
=
"NodeName"
if
ctx
.
IDENTIFIER
()
!=
nil
{
currentNode
.
Class
Name
=
ctx
.
IDENTIFIER
()
.
GetText
()
currentNode
.
Node
Name
=
ctx
.
IDENTIFIER
()
.
GetText
()
}
if
ctx
.
EXTENDS
()
!=
nil
{
currentNode
.
Extend
sName
=
ctx
.
TypeType
()
.
GetText
()
currentNode
.
Extend
=
ctx
.
TypeType
()
.
GetText
()
}
if
ctx
.
IMPLEMENTS
()
!=
nil
{
...
...
@@ -65,7 +65,7 @@ func (s *JavaIdentifierListener) EnterClassDeclaration(ctx *parser.ClassDeclarat
func
(
s
*
JavaIdentifierListener
)
ExitClassBody
(
ctx
*
parser
.
ClassBodyContext
)
{
hasEnterClass
=
false
if
currentNode
.
Class
Name
!=
""
{
if
currentNode
.
Node
Name
!=
""
{
nodes
=
append
(
nodes
,
*
currentNode
)
}
currentNode
=
core_domain
.
NewJIdentifier
()
...
...
@@ -73,7 +73,7 @@ func (s *JavaIdentifierListener) ExitClassBody(ctx *parser.ClassBodyContext) {
func
(
s
*
JavaIdentifierListener
)
ExitInterfaceDeclaration
(
ctx
*
parser
.
InterfaceDeclarationContext
)
{
hasEnterClass
=
false
if
currentNode
.
Class
Name
!=
""
{
if
currentNode
.
Node
Name
!=
""
{
nodes
=
append
(
nodes
,
*
currentNode
)
}
currentNode
=
core_domain
.
NewJIdentifier
()
...
...
@@ -98,7 +98,7 @@ func (s *JavaIdentifierListener) EnterConstructorDeclaration(ctx *parser.Constru
}
func
(
s
*
JavaIdentifierListener
)
ExitConstructorDeclaration
(
ctx
*
parser
.
ConstructorDeclarationContext
)
{
currentNode
.
Methods
=
append
(
currentNode
.
Method
s
,
currentMethod
)
currentNode
.
Functions
=
append
(
currentNode
.
Function
s
,
currentMethod
)
}
func
(
s
*
JavaIdentifierListener
)
EnterInterfaceBodyDeclaration
(
ctx
*
parser
.
InterfaceBodyDeclarationContext
)
{
...
...
@@ -135,7 +135,7 @@ func (s *JavaIdentifierListener) EnterInterfaceMethodDeclaration(ctx *parser.Int
}
func
(
s
*
JavaIdentifierListener
)
ExitInterfaceMethodDeclaration
(
ctx
*
parser
.
InterfaceMethodDeclarationContext
)
{
currentNode
.
Methods
=
append
(
currentNode
.
Method
s
,
currentMethod
)
currentNode
.
Functions
=
append
(
currentNode
.
Function
s
,
currentMethod
)
currentMethod
=
core_domain
.
NewJMethod
()
}
...
...
@@ -184,7 +184,7 @@ func (s *JavaIdentifierListener) EnterMethodDeclaration(ctx *parser.MethodDeclar
}
func
(
s
*
JavaIdentifierListener
)
ExitMethodDeclaration
(
ctx
*
parser
.
MethodDeclarationContext
)
{
currentNode
.
Methods
=
append
(
currentNode
.
Method
s
,
currentMethod
)
currentNode
.
Functions
=
append
(
currentNode
.
Function
s
,
currentMethod
)
currentMethod
=
core_domain
.
NewJMethod
()
}
...
...
@@ -202,8 +202,8 @@ func (s *JavaIdentifierListener) EnterAnnotation(ctx *parser.AnnotationContext)
func
(
s
*
JavaIdentifierListener
)
EnterInterfaceDeclaration
(
ctx
*
parser
.
InterfaceDeclarationContext
)
{
hasEnterClass
=
true
currentNode
.
Class
Type
=
"Interface"
currentNode
.
Class
Name
=
ctx
.
IDENTIFIER
()
.
GetText
()
currentNode
.
Type
=
"Interface"
currentNode
.
Node
Name
=
ctx
.
IDENTIFIER
()
.
GetText
()
}
func
(
s
*
JavaIdentifierListener
)
EnterExpression
(
ctx
*
parser
.
ExpressionContext
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录