
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Introduction and Motivation to Java Reflection as an advance Java and JVM feature
Practice the reflection API by obtaining class objects through three methods, analyze built-in and custom types like drawable, square, and color, and print class name, package, and interfaces.
This lecture teaches using Java reflection to discover constructors, inspect parameter types, and build a generic factory that creates objects by invoking the appropriate constructor.
Use java reflection to access private constructors by setting accessible to true, creating a deeply immutable singleton server configuration, and launching an http server with a greeting on port 8080.
Set field values with reflection by locating fields, making them accessible, and parsing values to populate config objects; implement a generic config file parser.
Learn to invoke methods with Java reflection, handle return types and invocation target exceptions, and group diverse clients from different libraries into an instance-to-method map for polymorphic, decoupled execution.
Learn how Java modifiers govern access and behavior. Use reflection to discover and analyze class, method, and field modifiers with bitmasks and helper methods.
Learn to retrieve annotation objects at runtime via Java reflection, read their element values, and apply annotation-driven techniques like scan packages and retry operation to initialization logic.
Create a dynamic proxy in Java reflection that intercepts interface methods via an invocation handler, delegates to the real object, and implements a time measuring proxy.
Welcome to the #1 Online Resource on Java Reflection
Description
Java Reflection is one of the most powerful features of the Java language that allows you to utilize your JVM's capabilities to its full potential. And it's no coincidence that the most popular and widely used Java libraries and frameworks are powered by the Reflection API.
But Reflection is not reserved only for those libraries.
YOU TOO can completely transform and re-architect your code and create unique and powerful applications, algorithms, and libraries in Java using Reflection.
Teaching Philosophy
In this course, we will start from the basics and build our way up to complete mastery of Java Reflection through:
Theory and API.
Practical application of our skills in real-life examples and use cases.
Along the course, we also have plenty of quizzes and coding exercises to help you practice and validate your progress.
This is an advanced Java course, which will take your Java skills to a whole new level!
Your mastery of Java Reflection will set you apart from any other Java developer.
By the End of the Course
You will be able to
Discover and Analyze Java Classes and Objects at Runtime
Instantiate new Objects, Arrays, and Dynamic Proxies in a type-independent way
Invoke methods dynamically
Read and Update an Object state
Define your very own Annotations and combine them with Java Reflection code
Write powerful and intelligent algorithms
Join us today for this exciting journey and learning experience!