Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Reflection API Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Reflection API" Watch "Reflection API" New topic
Author

Reflection API

Damodara Reddy
Ranch Hand

Joined: Feb 09, 2007
Posts: 44
What is a reflection API, how to use it...?
I heard we can access private variables using reflection API, how?


Damu
Rao Raghu
Ranch Hand

Joined: Jan 05, 2007
Posts: 100
Find it here




RAGHU<br /> <br />"When the going gets tough, the tough get going"
Damodara Reddy
Ranch Hand

Joined: Feb 09, 2007
Posts: 44
thanks Raghu
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Yes , it partially true.
You can set / reset private variables is the security manager is disabled in your JVM , otherwise you need to give your code special permissions to do this.


Rahul Bhattacharjee
LinkedIn - Blog
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1318

see this.. Real Magic of Java Reflection

hope you will find it more helpful..


Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Reflection API
 
Similar Threads
Can i build and compile a JAVA pgm in another JAVA program?
Anyone got an elegant solution?
How heavy is reflection api
how do I use methods in external class file?
got private variables :(