How do I organize my java eclipse project so that users only need to import once?

How do I organize my java eclipse project so that users only need to import once?

I'm developing a graphics library. I have all kinds of packages, such as graphics A,graphics. B and so on, but when I give this library to the user, I hope he can use @ H_ 404_ 10 @ it just takes importing graphics as an example I don't know what to do My way @ h_ 404_ 10 @ now he will have to do import graphics A. , import graphics B. Etc

thank you

Solution

Then, tools should pay attention to the management of imports I'm not sure why single import is important, but I don't know your motivation, so I'll accept it

>Put all the courses in one package (not recommended at all.) > Create a proxy class. Once instantiated, it will enter the package hierarchy, instantiate all the contents for you, and return object instances or some root types of the design (not recommended at all.) > Suppose your developers have a tool that can manage their imports without worrying about it (recommended.)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>