Java:可以合并仅包含其他包的包的空子目录吗?
大家下午好。
我对这里的“是”不太抱有希望,但如果有人能弄清楚的话,SO 的人也能。
我有一个具有以下包结构的 Java 项目:
src
|-net
| |-binarymuse
| |-gwt
| |-client
| | |-ui
| | |-project
| | |-Project.java
| |-Project.gwt.xml
|-overview.html
我想合并 src/ 文件夹中的空子目录,以便代替 /src/net/binarymuse/gwt/client/ui/project/
我有 /src/net.binarymuse.gwt/client.ui.project/
。这可能吗?
谢谢。
Good afternoon, all.
I'm not too hopeful for a "yes" here, but if anyone can figure it out, the folks at SO can.
I have a Java project that has the following package structure:
src
|-net
| |-binarymuse
| |-gwt
| |-client
| | |-ui
| | |-project
| | |-Project.java
| |-Project.gwt.xml
|-overview.html
I would like to consolidate the empty subdirectories in the src/ folder so that instead of /src/net/binarymuse/gwt/client/ui/project/
I'd have /src/net.binarymuse.gwt/client.ui.project/
. Is this possible?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
应该可以编写一个像这样工作的类加载器,甚至可以通过子类化 URLClassLoader。
It should be possible to write a classloader that works like this, perhaps even by subclassing URLClassLoader.
您无法折叠磁盘上的目录,不,但是某些 IDE(例如 Eclipse)在显示类层次结构时会自动执行此操作
You can't collapse the directories on disk, no, but some IDEs (e.g. Eclipse) will do it automatically when they show the class hierarchy