Hi,
I've got a question concerning tests on non-public classes. Is there any
possibility to test these classes if they are located in a different package?
I'm thinking of something equal to setAccessible(true) for functions. Now I know
that this won't work with classes as they are not derived from AccessibleObject.
To load the class outside the package I use something like
Class myClass = Class.forName("reflection.classes.MyClass");
But if I try
Object instance = myClass.newInstance();
I get an IllegalAccessException.
Anyone knows about this?
Thanks!