File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Reflection API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reflection API" Watch "Reflection API" New topic

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?

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: 2308
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: 1321

see this.. Real Magic of Java Reflection

hope you will find it more helpful..

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
I agree. Here's the link:
subject: Reflection API
It's not a secret anymore!