I use gRPC framework with Proto 3. We have a java code coverage tool Jacoco which scans java byte code for java "annotation" @Generated in compiled classes and if it has one, it skips that java class from coverage. But Proto-compiler adds this annotation:
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.20.0)",
comments = "Source: myProto.proto")
public class MyClass {
...
}
But the annotation javax.annotation.Generated has @Retention(value=SOURCE) which doesn't exist in compiled classes.
Is there a way to add annotation to java generated files from protobuf as compile-time?