Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Reflection API Tutorials and Examples

                         

  1. Reflection API : A Brief Introduction
    In this section you will learn about Reflection API and all of its methods.
    Reflection API is a powerful technique (that provides the facility) to find-out its environment as well as to inspect the class itself. Reflection API was included in Java 1.1.

    Here we are providing few of the examples to give a better overview of the Reflection API :

  2. Getting the implemented Interfaces
    In this section you will learn how to retrieve an Interface (that included in the program) by using the getInterfaces() method. Here is an example that provides the usage of the getInterfaces() method in more detail. 

  3. Retrieving the class name through Reflection API
    A more generic way, how to retrieve the name of the class (that is used in the program) that reflects the package name by using the getName() method. Here is an example that provides the proper way to use the getName() method.

  4. Finding out the superclass name of the Class
    Here we show you the way to find out the Superclass name by using the getSuperclass() method. The given example demonstrates the use of getSuperclass() method in more detail.

  5. Getting the method name used in the Application
    In this section we describe how to retrieve method name by using the getMethods() method. Here is an example that demonstrates the use of the getMethods() method in more detail.

  6. Finding out the object of the Class
    This section illustrates how to retrieve an object name that reflects the package name by using the object.getClass() method. Here is an example that provides the proper usage of the object.getClass() method in more detail.

  7. Finding out the class fields
    This section explores you, how to retrieve the fields of the class by using the getFields() method. For this we are taking an example that provides the use of the getFields() method in detailed way.

  8. Getting information about Constructor
    In this section you will learn, how to retrieve the information about the constructor by using the getConstructors() method. Here is an example that provides the usage of the getConstructors() method.

  9. No Argument Constructor Example
    In this section you will learn how to know that whether any class consists No-Argument Constructor or not ?. Here is an example that provides the usage of the newInstance() method in more detail.

  10. Getting Methods Information of a class
    In this part of tutorial you will learn how to retrieve information of all methods of a class (that included in the program) by using the getMethods() method. Here is an example that provides the usage of the getMethods() method in more detail.

  11. Identifying array using Reflection
    In this section we will describe you how to identify the object is Array or not ? with the use of boolean method isArray(). Here is an example that demonstrates the use of the isArray() method for identification of Array object.

  12. Getting Fields Information of a class
    In this section of "Reflection Tutorial" you will know how to retrieve the  specific field of any class by using the getField() method. For this we are taking an example that provides the use of the getField() method in detailed way.

  13. Getting Component type
    In this section you will come to know that how you can retrieve Component Type of an array's element. The component type of an Array is the type of array's element.

  14. Examine Interface Example
    In this part of tutorial we will discuss how do you know that whether a given class is an "Interface" or a "Class"

  15. Class Modifier Example
    In this section you will learn how to retrieve modifier's information of a class that we have taken in our program.

  16. Calling ( Invoking ) Methods through Reflection
    In previous sections we have seen that how we can use "Reflection" to get information related to any Method. Now in this section of the tutorial you will come to know that we can also call methods of a class with the help of "Reflection"

  17. Setting Fields Information of a class using Reflection
    As in our previous example we have seen that we can get field values of a class by using the Field class. Now we can also set different field values of that class by using set() method.

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
jsp:param
jsp view data in mysql
java for loop
TextField
program
menu bar in java
Flash Special Effects
C and Cpp Programming
shellscriptsusingunixc
mysqlblob
loadingbarsimagesinj2m
javafileforActionSuppo
Java General Java Java
jfreechart dial/mete
date j2me
PHP Date and .....:/pw
login jsp
sockets program using
how to connect Ms acce
update mysql using jsp
Retrieving Data From d
java example for blob
how to get the time di
disabaleJframe
basic servlet structur
Enabling and Disabling
PHP Date and .../tools
abstractcodes
array list
servlets
date j2me midlet
table itext
text box in jsp
java operators
.setDocument(new Integ
wraptextintd
JSF login page sample
session authontication
Java General Java Tile
userdefinedexceptionsa
JTestbutton code
drow rectangular
web applications
Java Mysql
indexof
collection list
join criteria
java charts
conditional Statements
JSF Tagsfor selection
How to write a J
public void actionPerf
t:div
php oops polymorphism
Java Count Vowels in t
html grids
redirect to another ac
netbeans jsp jdbc
PhotoshopEffectsHolein
list iteration in java
listtovector
ะ ะ????????ะ à
XNA
DOM
Excel open java applic
CMP Entity bean
json with gwt
create xml using java
number array
struts 2 regular expre
actionmapper
java mail
Photoshop Cut out imag
offset
onmoveover tooltip mes
exportdatabasedatainto
typesofexceptions
source code for chat p
validate radio button
stringbuilder replace
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.