Create @GrpcClass annotation processor hook for generated source files.
See original GitHub issueTo write an annotation processor that further augments the generated source from the grpc protoc plugin is a little difficult.
Currently, I process @Generated
annotations and search for value ~= /gRpc/
.
As an external example, looking at the new grpc-dagger in 2.11 (google/dagger#647), the additional dagger code generation is triggered off of an annotation applied to the implementing class. It would be nice to have all the code generation based off of the gprc classes. Right now it feels like a two step process. Add the proto, generate the grpc stub, implement the stub, add the processor annotation, compile again for the additional code.
WDYT?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Java Annotation Processing and Creating a Builder - Baeldung
A quick and practical guide to annotation processing in Java, showing you how to create a builder from a POJO.
Read more >Java Annotation Processor: only generate a source file if it ...
I want to be able to generate a source file once, and then allow it to be edited manually by a developer without...
Read more >2 posts tagged with "http" - Apache ShenYu
The ShenyuClientRegisterRepository generated in the configuration file above is a concrete implementation of the client registration, which is an interface with ...
Read more >chore(deps): update dependency io.quarkus:quarkus ... - GitLab
... #25193 - Use plain old load class in RR generated code ... #24028 - Use a copy of compile classpath for panache...
Read more >Code Generation using Annotation Processors in the Java ...
Now, in part 3, we are going to show how an Annotation Processor can be used to generate source code. Code Generation using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was partially addressed in #4609. The RpcService still doesn’t have an annotation, but it could follow in the same vein.
@daicoden What plugin are you using to allow dagger to create the auto generated files upon compilation? I’ve referenced my issue on the Dagger project https://github.com/google/dagger/issues/2157. Your help is greatly appreciated.