JetBrains / JetBrains/java-annotations

Annotation for linking (generated) code

Ouverte
#71 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Kotlin
Étoiles
463
Forks
72
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.