Dictionary meaning of reflection: The throwing back by a body or surface of light, heat, or sound without absorbing it.
Java reflection is an API which is used to express code which is able to inspect other code in the same system. It provides the ability to inspect classes, interfaces, fields and methods at runtime, without knowing much about them at compile time. We can modify the runtime behavior of application using reflection. Refection can be used to instantiate new objects, invoke its methods and get or set field values using reflection.
The java.lang and java.lang.reflect packages provide classes for java reflection.
Java reflection tutorial
- Java reflection class
- Java reflection get class object
- Java reflection get super class object
- Java reflection get implemented interfaces
- Java reflection get all public methods
- Java reflection get all public constructors
- Java reflection get all public fields
- Java reflection get all annotations
- Java reflection get package name
- Java reflection get class modifiers
- Java reflection get parameter type
- Java reflection get public field
- Java reflection get field declaring class
- Java reflection get field type
- Java reflection get set public field value
- Java reflection get set private field value
- Java reflection get public method
- Java reflection get method parameter names
- Java reflection get method parameter types
- Java reflection get method return value
- Java reflection get method modifier value
- Java reflection call or invoke public method
- Java reflection call or invoke private method
- Java reflection get public constructor
- Java reflection get private constructor
- Java reflection instantiate an object