Can you find all classes in a package using reflection?

前端 未结 27 2216
不知归路
不知归路 2020-11-21 05:24

Is it possible to find all classes or interfaces in a given package? (Quickly looking at e.g. Package, it would seem like no.)

27条回答
  •  情话喂你
    2020-11-21 06:07

    It is not possible, since all classes in the package might not be loaded, while you always knows package of a class.

提交回复
热议问题