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