gpt4 book ai didi

java - 在jruby中导入java包中的所有类

转载 作者:搜寻专家 更新时间:2023-11-01 03:08:03 25 4
gpt4 key购买 nike

<分区>

我正在寻找等同于

的语法
import com.mycom.mypack.*

对于 jruby

例如java_import com.mycom.mypack.

此功能是通过 JRUBY 6334 JIRA 添加的

https://jira.codehaus.org/browse/JRUBY-6334

但我不清楚实际的语法是什么。

这是 Jruby 先生自己的评论:

Charles Oliver Nutter added a comment - 17/Feb/12 1:13 PM

commit a39a7440c21b411c4592a27d2ef9e0ca73736590
Author: Charles Oliver Nutter <headius@headius.com>
Date: Fri Feb 17 13:06:24 2012 -0600

Fix JRUBY-6334: Import multiple classes via java_import

I opted to just go with the simple version to resolve this issue.
I have nothing against introducing some syntax to import multiple
classes from the same package, but I didn't see anything that we
all agreed looked nice, and in any case you could use other Ruby
constructs to build the list of full names you pass to java_import.

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com