Advanced Reflection in Java

Reflection is a killer feature in Java Language. It's a technique that combined with annotations and interfaces allows us to do Dynamic and Generic programming which could be complete abstractions or even customizable callbacks. Reflection allows us to do Dynamic discovery in sense of Types, Methods, Fields, Methods, and Annotations. People often couple Annotations with Aspects or AOP. You do not need Aspect you dont need AOP in order to do Generic and dynamic programming using Annotations. Today I want to share a simple POC I made to show the power of annotations combined with Reflection. We will do a 2 layer abstraction pattern. The first level is more generic and the second level allows customization. So Let's get started.


The Video


The Code


Cheers,
Diego Pacheco

Popular posts from this blog

Kafka Streams with Java 15

Rust and Java Interoperability

HMAC in Java