Skip to content
Permalink
Browse files

Use parameter name comment

  • Loading branch information...
ST-DDT committed Jun 26, 2019
1 parent 73e0d74 commit 5af81a442b1687fb5ad14921dc4a0c16fd9fef09
@@ -197,6 +197,9 @@ cmake/cmake-build-debug/
# Visual Studio 2017
.vs

# Visual Studio Code
/.vscode/

# IntelliJ
.idea
*.iml
@@ -280,7 +280,7 @@ void WriteFieldEnumValueAccessorDocComment(io::Printer* printer,
"name", field->camelcase_name());
break;
case LIST_INDEXED_SETTER:
printer->Print(" * @param index The index of the value to return.\n");
printer->Print(" * @param index The index to set the value at.\n");
printer->Print(" * @param value The enum value of the $name$ to set.\n",
"name", field->camelcase_name());
break;
@@ -336,7 +336,7 @@ void WriteFieldStringBytesAccessorDocComment(io::Printer* printer,
"name", field->camelcase_name());
break;
case LIST_INDEXED_SETTER:
printer->Print(" * @param index The index of the value to return.\n");
printer->Print(" * @param index The index to set the value at.\n");
printer->Print(" * @param value The bytes of the $name$ to set.\n",
"name", field->camelcase_name());
break;
@@ -220,7 +220,8 @@ void ImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return $name$_;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$Value$}$(int value) {\n"
@@ -238,7 +239,8 @@ void ImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return result == null ? $unknown$ : result;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$$}$($type$ value) {\n"
@@ -251,7 +253,8 @@ void ImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -441,7 +444,8 @@ void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers(
" return $default_number$;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$Value$}$(int value) {\n"
@@ -464,7 +468,8 @@ void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers(
" return $default$;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$$}$($type$ value) {\n"
@@ -477,7 +482,8 @@ void ImmutableEnumOneofFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -738,7 +744,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return $name$_converter_.convert($name$_.get(index));\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n"
" int index, $type$ value) {\n"
@@ -751,7 +758,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$add$capitalized_name$$}$($type$ value) {\n"
@@ -764,7 +772,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n"
" java.lang.Iterable<? extends $type$> values) {\n"
@@ -776,7 +785,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -804,7 +814,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_,
LIST_INDEXED_GETTER, true);
LIST_INDEXED_GETTER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$set$capitalized_name$Value$}$(\n"
@@ -816,7 +827,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_ADDER,
true);
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$add$capitalized_name$Value$}$(int value) {\n"
@@ -826,8 +837,8 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_ADDER,
true);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_,
LIST_MULTI_ADDER, /* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$addAll$capitalized_name$Value$}$(\n"
@@ -236,7 +236,8 @@ void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
" return instance.get$capitalized_name$Value();\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$Value$}$(int value) {\n"
@@ -253,7 +254,8 @@ void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
" return instance.get$capitalized_name$();\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$$}$($type$ value) {\n"
@@ -262,7 +264,8 @@ void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -415,7 +418,8 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers(
" return instance.get$capitalized_name$Value();\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$Value$}$(int value) {\n"
@@ -432,7 +436,8 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers(
" return instance.get$capitalized_name$();\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$$}$($type$ value) {\n"
@@ -441,7 +446,8 @@ void ImmutableEnumOneofFieldLiteGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -675,7 +681,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
" return instance.get$capitalized_name$(index);\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n"
" int index, $type$ value) {\n"
@@ -684,7 +691,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$add$capitalized_name$$}$($type$ value) {\n"
@@ -693,7 +701,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n"
" java.lang.Iterable<? extends $type$> values) {\n"
@@ -702,7 +711,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -732,7 +742,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_,
LIST_INDEXED_SETTER, true);
LIST_INDEXED_SETTER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$set$capitalized_name$Value$}$(\n"
@@ -743,7 +754,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_, LIST_ADDER,
true);
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$add$capitalized_name$Value$}$(int value) {\n"
@@ -752,7 +763,8 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldEnumValueAccessorDocComment(printer, descriptor_,
LIST_MULTI_ADDER, true);
LIST_MULTI_ADDER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$addAll$capitalized_name$Value$}$(\n"
@@ -257,7 +257,8 @@ void ImmutablePrimitiveFieldGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);

WriteFieldAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$$}$($type$ value) {\n"
@@ -269,7 +270,8 @@ void ImmutablePrimitiveFieldGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);

WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -534,7 +536,8 @@ void ImmutablePrimitiveOneofFieldGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);

WriteFieldAccessorDocComment(printer, descriptor_, SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$set$capitalized_name$$}$($type$ value) {\n"
@@ -546,7 +549,8 @@ void ImmutablePrimitiveOneofFieldGenerator::GenerateBuilderMembers(
"}\n");
printer->Annotate("{", "}", descriptor_);

WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"
@@ -735,7 +739,8 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers(
" return $repeated_get$(index);\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n"
" int index, $type$ value) {\n"
@@ -746,7 +751,8 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder "
"${$add$capitalized_name$$}$($type$ value) {\n"
@@ -757,7 +763,8 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, true);
WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER,
/* builder */ true);
printer->Print(variables_,
"$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n"
" java.lang.Iterable<? extends $boxed_type$> values) {\n"
@@ -768,7 +775,8 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers(
" return this;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, true);
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ true);
printer->Print(
variables_,
"$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n"

0 comments on commit 5af81a4

Please sign in to comment.
You can’t perform that action at this time.