0

I'm trying to create a library such as retro-lambda that reads the code at edit time or compile time and provides hints for the developer.

Let's say I'm using retro-lambda library and I created an interface that has only one method:

public interface Callback{
    void onResult(boolean isSuccess, Object result);
}

When I create an instance:

Callback callback = new Callback() {

    public void onResult(boolean isSuccess, Object result) {

    }
}

Here the retro-lambda will create a hind for the developer to use the lambda function as following:

Callback callback = (isSuccess, result) -> {

}

What do I need to learn about how to create library that inspects the code and adds hints to the user ?

Khalid Taha
  • 3,183
  • 5
  • 27
  • 43

1 Answers1

3

For providing an IDE hint you will want to build an Android Studio plugin.

For inspecting, modifying or generating Java source code at compile-time you will want an annotation processor.

urgentx
  • 3,832
  • 2
  • 19
  • 30
  • That seems useful for me, I will read about it and if I found my solution, I will make this answer as my solution – Khalid Taha Feb 07 '18 at 00:17