JetBrains / JetBrains/java-annotations

Annotation for linking (generated) code

Đang mở
#71 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Kotlin
Star
463
Fork
72
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.