如何能够知道自定义函数间的调用关系?

自定义函数中,定义了一个函数B,如何才能知道函数B被哪些自定义函数调用了呢?

请先 登录 后评论

1 个回答

Juntao Wang

示例代码如下:

foo 调用了funcB,查看funcB 被哪些函数调用。

def funcB(a) {
	return a * 2
}

def foo(a) {
	return 1 + funcByName(a)
}

select name from defs() where userDefined = true, each(x -> funcByName(x).string(), name) like "%funcB%"
请先 登录 后评论