This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes Use of reflection API Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Use of reflection API" Watch "Use of reflection API" New topic
Author

Use of reflection API

Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146

Hi,

Currently I am reading about the Reflection API in java.So I have one query regarding the use of Reflection APIs.
I read that reflection is meant for the "introspection" of a java beans.Is this the only use of Reflection?

If not,will you please enlist some of the practical use of the java Reflection API,other than getting the info about the class ie method,constructors etc.

Thanks


The important thing is not to stop questioning.Curiosity has its own reason for existing.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26496
    
  78

Calling a method dynamically. This is useful in tooling, when you don't know the method signature at compile time.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Use of reflection API
 
Similar Threads
Java Reflection for EJB
Can i build and compile a JAVA pgm in another JAVA program?
Reflection in jdk1.5?
how do I use methods in external class file?
Doubt regarding EJBMetaData Vs Reflection API