如何在 Ruby 中将 Java 接口作为过程调用
我希望能够将某个接口的 java 实现传递给 Jruby,然后将其用作过程。不幸的是,对我来说,这些示例展示了如何将 jruby 类包装到 java 接口中,但没有一个符合我的要求。
快速浏览一下 RubyProc 似乎是显而易见的解决方案,但我无法满足块要求。帮助器 JavaUtils、JavaUtilities 和 JavaEmbedUtils 也没有帮助。
Id like the ability to pass an java implementation of some interface to Jruby and then use it as a proc. Unfortunately for me the examples show how one can wrap jruby classes into java interfaces but none that match my request.
A quick look at RubyProc seems like the obvious solution but i cant satisfy the Block requirement. The helpers JavaUtils, JavaUtilities and JavaEmbedUtils dont help as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论