Reflection
1.1 Introduction to Reflection
Reflection is the ability to examine and/or modify the properties
or behavior of an object at run-time.It specifically applies to
objects,so you need an object of a class to get information for
that particular class. Learn More... |
1.2 Usage of Reflection
It is a advanced feature and should be used only by developers.
Developers who have a strong Knowledge of the fundamentals of the
language. Learn More... |
1.3 Class Meta Information
By using Java Reflection you can inspect Java classes at runtime.
Inspecting classes is often the first thing you do when using
Reflection. Learn More... |
1.4 Get Constructor
Using Java Reflection you can inspect the constructors of classes
and instantiate objects at runtime.This is done via the Java class
java.lang.reflect.Constructor.This text will get into more detail
about the Java Construcor object. Learn More... |
1.5 Get Field
Using Java Reflection you can inspect the fields (member variables)
of classes and get / set them at runtime.This is done via the Java
class java.lang.reflect.Field.This text will get into more detail
about the Java Field object. Learn More... |
1.6 Set and Get field value
Using Java Reflection you can inspect the fields (member variables)
of classes and get / set them at runtime.This is done via the Java
class java.lang.reflect.Field.This text will get into more detail
about the Java Field object. Learn More... |
1.7 Get Method
Using Java Reflection you can inspect the methods of classes and
invoke them at runtime. This is done via the Java class
java.lang.reflect.Method. Learn More... |
1.8 Get Parent Class and Interface
When We use an interface as the variable type, and just reload the
implementing class and Use a superclass as the variable type, and
just reload a subclass. Learn More... |
1.9 Get Package
You can obtain information about the package from a Class object.
Learn More... |
1.10 Examples
Here are some examples for Reflection.
|


