Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Class class

There is run-time information about classes that you can access.

Tutorial Details:

Like a human thinking about his/her own thinking, the process of a running program examining its classes is called reflection or introspection.

There is run-time information about classes that you can access. The central class representing this information is java.lang.Class, a class confusingly named Class.

Use the Object getClass() method to get a Class object
Every class has the class Object as an ancestor. A reflection method in the Object class is getClass(), which returns the Class of that object.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/other/90introspection/10classclass.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Class class

View Tutorial:
Class class

Related Tutorials:

Java Tip 39: The trick to using a basic Java 1.1 network and file class loader - JavaWorld -
Java Tip 39: The trick to using a basic Java 1.1 network and file class loader - JavaWorld - October 1997
 
Java Tip 70: Create objects from jar files! - JavaWorld - March 1999
Java Tip 70: Create objects from jar files! - JavaWorld - March 1999
 
Programming Java threads in the real world, Part 7 - JavaWorld - April 1999
Programming Java threads in the real world, Part 7 - JavaWorld - April 1999
 
Singletons vs. class (un)loading - JavaWorld - May 1998
Singletons vs. class (un)loading - JavaWorld - May 1998
 
Static class declarations
Static class declarations
 
Create a custom Java 1.2-style ClassLoader - JavaWorld March 2000
Create a custom Java 1.2-style ClassLoader - JavaWorld March 2000
 
Object mobility in the Jini environment - JavaWorld January 2001
Object mobility in the Jini environment - JavaWorld January 2001
 
The basics of Java class loaders
The basics of Java class loaders
 
Back to your Class roots
Back to your Class roots
 
Inside Class Loaders: Debugging
Inside Class Loaders: Debugging This article will show how to solve class-loading problems and to overcome some debugging limitations of the JDK class loaders.
 
Building Highly Scalable Servers with Java NIO
Building Highly Scalable Servers with Java NIO I/O Event Handling The I/O architecture of our router was strongly inspired by the Swing event-dispatch model. In Swing, events generated by the user interface are received by the JVM and stored in an even
 
Smokescreen Introduction
Smokescreen is a Java obfuscator. Aside from being able to change symbolic names, it can also modify the bytecode instructions in methods thereby obfuscating control flow. This makes the resulting obfuscated classes much more difficult to decompile.
 
Dynamic Delegation and Its Applications
Dynamic Delegation and Its Applications The Proxy pattern is an important and widely used design pattern in object-oriented programming. Do you ever use Proxy in Java since its introduction in JDK 1.3? A dynamic proxy class is a class that implements a l
 
ClassRemoter
ClassRemoter is a remote class wrapper generator for use with RMI. It can create remote wrappers for existing java classes and interfaces, that would not normally be used with RMI. The wrappers may then be used to access the public methods.
 
Calling JavaBeans from a JSP Page
We will be using this SimpleBean class in this tutorial, so if you haven't read above article then I suggest you do it now.
 
Understanding Network Class Loaders Class loaders
One of the cornerstones of Java dynamics, determine when and how classes can be added to a running Java environment.
 
Adding search to your applications
The Lucene search engine is an open source, Jakarta project used to build and search indexes. Lucene can index any text-based information you like and then find it later based on various search criteria.
 
Internals of Java Class Loading
When are two classes not the same? When they're loaded by different class loaders. This is just one of many curious side effects of Java's class-loading system. Binildas Christudas shows how different class loaders relate to one another and how (and why)
 

Understanding Struts Action Class In this lesson I will show you how to use Struts Action Class and forward a jsp file through it. What is Action Class? The Action Class is part of the Model and is a wrapper around the business logic. The purpose
 
JPackIt JPackIt is a Java application for packaging a Java project into single executable package
Java Project in single jar, class or exe containing all java application resources and referenced libraries.
 
Site navigation
 

 

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

Copyright © 2006. All rights reserved.