Get your code behaving how you want it.

The JVM ecosystem is mature and offers plenty of libraries, so you don’t need to reinvent the wheel. Basic — and not so basic — functionalities are just a dependency away. Sometimes, however, the dependency and your use-case are slightly misaligned.

The correct way to fix this would be to create a Pull Request. But your deadline is tomorrow: you need to make it work now! It’s time to hack the provided API.

In this post, we are going through some alternatives that allow you to make third-party APIs behave in a way that their designers didn’t intend to.

#java #tutorial #api #hack #aspect-oriented programming #java agent #classpath shadowing #java reflection

Hacking Third-Party APIs on the JVM
1.20 GEEK