Open wires opened 11 years ago
I would agree on getting properties with non java bean properties accessors but I'm not convinced breaking encapsulation by calling private methods is right (others might have another opinion).
Well maybe "private" doesn't make much sense, but for instance I very often give "internal APIs" methods with "package" visibility which are then exposed only to the internal classes building on that API. To me it makes sense to the this internal API.
What do you think?
Please use FEST-Reflect. It can access fields, properties, methods and more, via Reflection. It provides a nice fluent interface too.
@alexruiz thanks! that is good enough for me, feel free to close the issue
Your nice library only supports properties of the form getX setX, so this doesn't work
It would be very nice (for me :^) ) if we could test code with methods named like that?
It is also not possible to test non public methods or private classes. In principle this shouldn't be a problem, reflection APIs can call private members.