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

Use of reflection API

Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146


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.


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

Joined: May 26, 2003
Posts: 33106

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

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
subject: Use of reflection API
It's not a secret anymore!