Sumario: | Reflection is a powerful Java feature that can be used to expand the capabilities of a program, to examine the class or object internals at runtime. Java Reflection is quite powerful and can be very useful. Java Reflection makes it possible to inspect classes, interfaces, fields, and methods at runtime, without knowing the names of the classes, methods, etc. at compile time. Java Reflection is useful for creating generic code, implementing dynamic frameworks, and testing and debugging. In this course, we start with the basics, then show how reflection works with the more modern language features such as sealed classes and records. We also show how arrays can be manipulated and created via reflection. Lastly, we show MethodHandle and VarHandle. Learn from hands-on exercises that are followed by demos revealing the solutions.
|