Accessing private members using reflection
1 posts in topic
Flat View  Flat View

Posted By:   sudheer_DHURJATI
Posted On:   Monday, June 4, 2001 06:53 AM

I need help regarding using reflection on private members. I want to get the information of private members of a class at run time. When I use reflection. I only get the public members. Any help/sample code
/reference is appreciated

Thanks in Advance
Sudheer Dhurjati

Re: Accessing private members using reflection

Posted By:   Finlay_McWalter  
Posted On:   Friday, June 15, 2001 05:47 PM

This is deliberate. Reflection is not a means whereby you can circumvent the regular access control features of the language - to do so would be to totally compromise security.

If you really want access to private stuff, the only thing you can do is to write some native code and use JNI to access the privates.

About | Sitemap | Contact