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:
Photoshop Color RGB vs
ั?ะ?ะ?ะà¸?ยÂ
program for display th
prepare statement exec
validating email using
h:selectmanycheckbox
compress file uploadin
array element in php
rest
how to edit a any file
cascading Style sheet
json lib/componen...]=
text area
login code using jsp
json lib/componen...]=
java servlet send soun
distinguish between Re
Building a Simple EJB
what is Ice Faces
image on title bar sou
File Validation code
Java program for keywo
program to explain the
fade out
convert text file to i
select checkbox
usingbufferedreaderin.
sร?ย ร?ยà¸??à
table joining
set cell value JTable
calculator in java wit
Combattons la programm
cache
setting all array val
ASP.NET.NETSendingMass
fake
joining
chache
call ?ะà¸?????????à¸
json lib/componen...]=
how to upload image ur
chaching
Linux Caixa MÑ?Ð??Ñ?Ð?
how to retrieve drop d
import java.io
where class files are
Photoshop Color Painti
message box display
�����?��
File
How do I get web appli
pure mvc flex
Insert Data in Table U
remove array element
MurachÑ??д?Ñ??и?Ñ??Ð
Hibernate sequences
jsf datatree component
find out factors of nu
jsp struts 2 tags
how to export zeroes t
??????????????????????
Passing Various Data T
source code of puzzle
3DS MAX Modeling Model
select a row of data t
netbeans jsp
multiple rows in singl
Photoshop Textures and
json lib/componen...]=
Visual Basic Date and
da Jfreechart a image
jfreechart
distributed cache upda
CSSCSSTheRevealTransFi
substring
java forward to page
<s:push> in struts2
JDBC and Mysql
how to add customised
struts2 checkbox
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.