如何将错误的c#-ish设计更改为在java中使用合理的访问保护?want classes elsewhere in the package (that don't inherit from class) to see these.} Protected(c#) != Protected(java) ≈≈ Internal(C#
我必须实现一个逻辑,在给定一个子类的情况下,我需要访问它的父类和该父类的所有其他子类。我在Java反射中没有找到任何允许我们访问父类的所有子类的API。有什么办法可以做到吗?例如:class C extends class A
现在使用类B,我可以通过调用getSuperClass()找到超类。但是,一旦我有了父<