【发布时间】:2020-01-26 07:27:34
【问题描述】:
我想为任何 java 项目创建一个返回调用者和被调用者的程序。
我有这个方法:
def searchformethod(methodcalls,method):
for call in methodcalls:
if method in call[4]:
calll=call[0],call[2]
callerncallee.methodcaller.append(calll)
callerncallee.searchformethod(methodcalls,call[2])
方法调用中的每个调用都包含 ("class",".","caller",".","callee")
我需要一个递归来让每个方法在小型项目的情况下都能正常工作,
但在大型项目的情况下我得到了这个
callerncallee.searchformethod(methodcalls,call[2])
[Previous line repeated 989 more times]
RecursionError: maximum recursion depth exceeded
【问题讨论】: