Reflection
Java's runtime introspection mechanism for discovering and, within access constraints, invoking classes, constructors, methods, fields, and annotations dynamically.
Technical Context
Reflection underpins many frameworks, serializers, dependency-injection containers, and test tools, but it weakens compile-time guarantees and can complicate module access, native-image configuration, startup, and optimization. MethodHandle or generated code may be preferable on hot paths.
Related Concepts
- ClassLoader
- annotation
- MethodHandle
- dynamic dispatch