U
Ulrich Scholz
http://www.onjava.com/pub/a/onjava/2003/11/12/reflection.html?page=2
gives an excellent
introduction on how to use reflection to access private fields of
classes for the purpuse of unit testing.
Now assume that we want to test a class Class1. Class1 has a private
field v of type Vector<Class2>, where Class2 is a private inner class
of Class1.
How can I access v via reflection? E.g., I cannot assign v to a
variable in my unit test class because the type Class2 is not visible.
Thank you,
Uli
gives an excellent
introduction on how to use reflection to access private fields of
classes for the purpuse of unit testing.
Now assume that we want to test a class Class1. Class1 has a private
field v of type Vector<Class2>, where Class2 is a private inner class
of Class1.
How can I access v via reflection? E.g., I cannot assign v to a
variable in my unit test class because the type Class2 is not visible.
Thank you,
Uli