Releases: toolisticon/aptk
Annotation to constructor mapping
This release introduces a helper class and annotation to map configurations done in annotations to initialization commands for related classes.
One example:
I have created the FluApiGen project some time ago - a processor that helps to generate fluent api code.
The API allows to apply validators on method parameters by using annotations (i.e. for matching String based method parameter with regular expression).
The new helper class will generate the command needed to instantiate the annotation related implementations, which then can be included in the generated code.
Biggest benefit is that the annotation attribute values will be hardcoded in that initialization command - so the generated code will even work without the annotations present at runtime.
Fully support modules, records and sealed classes in aptk-tools
Moved code to support modules to aptk-tools.
So no more extension modules are needed.
Implementation for higher Java version features is provided via reflection.
So it's possible now to support higher version Java features even in a processor meant starting from Java 8.
Dropped Java 7 support and added ElementWrappers
Extended Java 7 support ends in July 2022, so Java 7 finally reaches EOL.
That's why Java 7 support is dropped with this release.
Java 8 is even more powerful.
ElementWrappers were added to provide better support for Java 8s streaming/lambda API.
Additionally it's possible now to add a custom interface to generated annotation wrappers.
This can be quite useful to handle multiple annotation types in a generic way.
It should also be possible to add some custom methods to the annotation wrapper by providing a default implementation(havnt't tested it yet)