• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Java Reflection

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is java reflection. Can anybody explain. Please suggest some tutorials on that.
 
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java tutorial on Reflection API
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java Reflection reflects Java programming types, your classes and interfaces, which u can use to examine those types in detail. The package java.lang.reflect contains the reflection package. You can use them to write a complete type browser, or write an application that interprets code that a user writes, turning that code into actual uses of classes, creation of objects, invocation of methods, and so on.

for the Sun tutorail see:
http://java.sun.com/docs/books/tutorial/reflect/
 
Rancher
Posts: 5018
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Reflection allows a programmer to use classes and methods at runtime without having to name them at compile time. Most programming refers to classes only at compile time. The programmer and compiler have to have all the definitions available when the program is compiled.
With Reflection, the program can create objects and use methods etc that were not known when it was compiled. The class and method names are Strings that are passed to Reflection methods for them to find the Class definitions which can then be examined and used. Think about how the BeanBox demo program must work.
 
Arathi Raj
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the uses of Java Reflection?
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Arathi Raj:
What are the uses of Java Reflection?



Did you even follow the link above or read what anyone else typed? There are several examples given above for the uses of Java Reflection.

Layne
 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic