我有下一个 JInvocation:
JInvocation jInvoke = JExpr.invoke(anotherPageInstance, method);
哪里anotherPageInstance是JVar和方法是JMethod。
我对此做了一些操作JInvocation,然后我想将它添加到test.body().invoketest 所在的位置JMethod。
主要问题是我不能,因为test.body().invoke没有选择JInvocation作为参数。
我可以做下一个: test.body().invoke(anotherPageInstance, method),但这对我没有帮助,因为我想保存JInvocation,并且当某些情况发生时,将其添加Jinvocation到正文中(正如我之前提到的,同时我对此做了一些操作JInvocation)。
有什么帮助吗?