Oh, now I've noticed that methods which generated by Lombok is visible from my annotation processor, but modifiers of fields is remain without Lombok transformations.
I created minimal example:
On run command gradle :app:build getters of @Value-marked class will be visible from annotation processor, but private modifier of field is invisible.
> Task :app:compileJava
C:\Users\hohserg\Documents\GitHub\CustomAnnotationProcessor_with_ Lombok\app\src\main\java\hohserg\apt\example\TestClass.java:7: Note: Found marked element
public class TestClass {
^
C:\Users\hohserg\Documents\GitHub\CustomAnnotationProcessor_with_ Lombok\app\src\main\java\hohserg\apt\example\TestClass.java:7: Note: field int some, modifiers[] Here must be [private, final] because @Value do all fields to private and final
public class TestClass {
^
C:\Users\hohserg\Documents\GitHub\CustomAnnotationProcessor_with_ Lombok\app\src\main\java\hohserg\apt\example\TestClass.java:7: Note: method int getSome(), modifiers[public] Getter which generated by @Value, visible
public class TestClass {
^
C:\Users\hohserg\Documents\GitHub\CustomAnnotationProcessor_with_ Lombok\app\src\main\java\hohserg\apt\example\TestClass.java:7: Note: constructor TestClass(int), modifiers[public] Constructor which generated by @Value, visible
public class TestClass {
^
Any ideas, how to add compatibility with Lombok to custom annotation processor?
понедельник, 5 октября 2020 г. в 13:22:44 UTC+3, Jan: