PF4J and Clojure

Hi everyone!

Recently I’ve needed to figure out how to use PF4J library from Clojure, and it was not very straightforward in some aspects.

There were almost no information on using PF4J from Clojure, besides one or two SA questions, which were unanswered, so I’ve wrote this post post in which I explain how one could build a rather simple PF4J extension point, plugin, and small app that loads and uses this plugin all in Clojure, with additional Java examples, based on demo application from PF4J repository.

Some things that were not very straightforward were class generation with Java annotations, especially nested classes, and Java annotation processing, which is a bit hard to do from Clojure, and I’ve opted out to processing this with external script written in Babashka and Jet.

So I hope this post would be helpful for someone!

3 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.