If package access prevents objects from communicating, add more public methods to the classes.
如果包访问不利于对象间的通信,就需要向类中添加更多的公共方法。
If you're using code like this in a performance hotspot, you can avoid the overhead by declaring fields and methods accessed by inner classes to have package access, rather than private access.
如果你在高性能的Hotspot中使用这些代码,可以通过声明被内部类访问的字段和成员为包访问权限,而非私有。
Put each test case in the same package as the class it's testing to gain access to package and protected members.
将每个测试实例与它要测试的类放在同一个包内,以获得对包成员和保护成员的访问权。
应用推荐