JetBrains / JetBrains/java-annotations

Annotation for linking (generated) code

Abierto
#71 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Kotlin
Estrellas
463
Forks
72
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

```java
public class Controller {
@Get("/foo")
public String getFoo(String param) { return "foo " + param; }
}
```

```java
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` parameter of the call site.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.