• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java Reflection

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Java tutorial on Reflection API
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • 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/
 
Master Rancher
Posts: 3922
36
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
What are the uses of Java Reflection?
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • 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
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic