reflection
-
Core Java
Create Java Objects Using Class Names
The Java Reflection API provides several methods to achieve this goal. Nevertheless, identifying the most appropriate one for the current…
Read More » -
Core Java
Method Handles in Java
In this example, we will discuss in detail about Method Handles in Java, a feature introduced in Java 1.7. We…
Read More » -
reflection
java.lang.reflect.Array Example
In this example we shall explain how to use java.lang.reflect.Array. The java.lang.reflect.Array class provides static methods to dynamically create and…
Read More » -
exceptions
java.lang.reflect.invocationtargetexception – How to handle Invocation Target Exception
Reflection is commonly used by programs which require the ability to examine or modify the runtime behavior of applications running…
Read More » -
reflection
Get package name
This is an example of how to get the package name of a class. Getting the package name of a class…
Read More » -
reflection
Get super class of an object
With this example we shall show you how to get the super class of an object. To get the super…
Read More » -
reflection
Get class from an object
In this example we shall show you how to get the class of an Object. To get the class that represents…
Read More » -
reflection
Get methods return type
This is an example of how to get the return type of a classe’s methods. To get the return type of…
Read More » -
reflection
Get Modifiers from an Object
In this example we shall show you how to get the modifiers of a class. To get the modifiers of a…
Read More » -
reflection
Invoke Method with reflection
With this example we are going to demonstrate how to invoke a method using reflection. In short, to invoke a…
Read More »
- 1
- 2