Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation for linking (generated) code #71

Open
U1F984 opened this issue Jun 22, 2022 · 0 comments
Open

Annotation for linking (generated) code #71

U1F984 opened this issue Jun 22, 2022 · 0 comments

Comments

@U1F984
Copy link

U1F984 commented Jun 22, 2022

Example Usecase: when defining a HTTP API and generating client code which maps to it it would be good to have the IDE be able to recognize this, in e.g. Dataflow Analysis.

public class Controller {
    @Get("/foo")
    public String getFoo(String param) { return "foo " + param; }
}
public class GeneratedControllerClient {
    @Calls("org.example.Controller.getFoo(String)")
    public String getFoo(String param) { /* do http call and return server result */ }
}

Optionally the generated client could have additional parameters, e.g. for a callback style invocation, and it would be possible to map e.g. return value of original method to some Consumer<ReturnType> parameter of the call site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant