Java: Possible to consolidate empty subdirectories for packages that only contain other packages?
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.开发者_如何学编程
It should be possible to write a classloader that works like this, perhaps even by subclassing URLClassLoader.
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
精彩评论