ctubbsii commented on code in PR #2553:
URL: https://github.com/apache/thrift/pull/2553#discussion_r853053392
##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -2922,6 +2932,33 @@ std::string
t_java_generator::get_java_type_string(t_type* type) {
}
}
+void t_java_generator::generate_field_annotations(std::ostream& out, t_field*
field) {
Review Comment:
```suggestion
void t_java_generator::generate_metadata_for_field_annotations(std::ostream&
out, t_field* field) {
```
##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -78,6 +78,7 @@ class t_java_generator : public t_oop_generator {
suppress_generated_annotations_ = false;
rethrow_unhandled_exceptions_ = false;
unsafe_binaries_ = false;
+ annotation_metadata_ = false;
Review Comment:
Maybe:
```suggestion
annotations_as_metadata_ = false;
```
##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -5737,4 +5774,6 @@ THRIFT_REGISTER_GENERATOR(
" generated_annotations=[undated|suppress]:\n"
" undated: suppress the date at @Generated
annotations\n"
" suppress: suppress @Generated annotations entirely\n"
- " unsafe_binaries: Do not copy ByteBuffers in constructors, getters,
and setters.\n")
+ " unsafe_binaries: Do not copy ByteBuffers in constructors, getters,
and setters.\n"
+ " annotation_metadata:\n"
+ " Include annotation metadata in the generated
code.\n")
Review Comment:
```suggestion
" annotations_as_metadata:\n"
" Include annotations as metadata in the generated
code.\n")
```
##########
lib/java/gradle/generateTestThrift.gradle:
##########
@@ -133,3 +134,12 @@ task generateUnsafeBinariesJava(group: 'Build') {
thriftCompile(it, 'UnsafeTypes.thrift', 'java:unsafe_binaries',
genUnsafeSrc)
}
+
+task generateWithAnnotation(group: 'Build') {
Review Comment:
```suggestion
task generateWithAnnotationMetadata(group: 'Build') {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]