Difficulty extending Lombok

user :

I want to create an annotation handler to extend the Java language. However I can't do this easily, because of the SCL files. I wanted to know if the Lombok developers made it this hard on purpose.

If I try extending JavacAnnotationHandler, it can't find it in lombok.jar because the name is JavacAnnotationHandler.SCL.Lombok. I cloned the GitHub repository but I keep getting errors with duplicate classes in the resources.after and resources.before package and Java 12 syntax. I am using lombok 1.18.8.

This is what I have.

    import lombok.javac.JavacAnnotationHandler;
    public class SingletonJavacHandler extends JavacAnnotationHandler<Singleton> {

It says "Cannot resolve symbol 'JavacAnnotationHandler'"

Roel Spilker :

The SCL files are to hide lombok implementation classes from autocomplete dialogs in IDEs.

The resources-before and resources-after files should not be compiled. They are in the test resources, because our testing framework processes them.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=133221&siteId=1