Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ggj][codegen] feat: add package-info.java codegen #414

Merged
merged 19 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ceaaddb
fix: refactor requestBuilder into separate method in ServiceClientCla…
miraleung Oct 7, 2020
fba69cb
Merge branch 'master' of github.com:googleapis/gapic-generator-java i…
miraleung Oct 8, 2020
32672f2
fix: merge master
miraleung Oct 21, 2020
bdcb62e
feat: add varargs to AnonClass and ref setter methods
miraleung Oct 21, 2020
e15e115
feat: add HTTP annotation parsing/validation
miraleung Oct 21, 2020
28d3b3c
feat: Generate RequestParamsExtractor in GrpcServiceStub
miraleung Oct 21, 2020
5293551
feat: add GrpcPublisherStub test to exercise HTTP subfields
miraleung Oct 21, 2020
2a50453
fix: add ByteString to DefaultValueComposer
miraleung Oct 21, 2020
e4684f3
fix: Use repeated field name for paged RPC unit tests
miraleung Oct 21, 2020
7829850
fix: refactor exception field, use paged repeated field name, add pub…
miraleung Oct 22, 2020
11c38bd
fix: ensure all testgen methods throw Exceptions
miraleung Oct 22, 2020
d3ec180
fix: Fix resname helper method names for of* and format*
miraleung Oct 22, 2020
6416984
fix: use only generated resnames in codegen
miraleung Oct 22, 2020
96046a6
fix: propagate of*Name changes to resname codegen
miraleung Oct 22, 2020
297f64a
fix: fix method arg resname mappings, add logging test
miraleung Oct 23, 2020
2691d8c
fix: ensure paged tests use the right repeated resp. type
miraleung Oct 23, 2020
01b8051
feat: add PackageInfoDefinition AST node
miraleung Oct 23, 2020
0d83a14
feat: add package-info.java codegen
miraleung Oct 23, 2020
aa08128
Merge branch 'master' into gp/g14
miraleung Oct 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: propagate of*Name changes to resname codegen
  • Loading branch information
miraleung committed Oct 22, 2020
commit 96046a636f884d09c567f1eb0ec5f9ace6d85891
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ private static MethodDefinition createParseMethod(
}

IfStatement.Builder ifStatementBuilder = IfStatement.builder();
String ofMethodNamePattern = "of%s";
String ofMethodNamePattern = "of%sName";
for (int i = 0; i < tokenHierarchies.size(); i++) {
VariableExpr templateVarExpr = templateFinalVarExprs.get(i);
MethodInvocationExpr conditionExpr =
Expand All @@ -688,7 +688,7 @@ private static MethodDefinition createParseMethod(
List<String> tokens = tokenHierarchies.get(i);
MethodInvocationExpr ofMethodExpr =
MethodInvocationExpr.builder()
.setMethodName(String.format(ofMethodNamePattern, getBuilderTypeName(tokens)))
.setMethodName(String.format(ofMethodNamePattern, concatToUpperCamelCaseName(tokens)))
.setArguments(
tokens.stream()
.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,17 @@ public class FoobarName implements ResourceName {
}
if (PROJECT_FOOBAR.matches(formattedString)) {
Map<String, String> matchMap = PROJECT_FOOBAR.match(formattedString);
return ofProjectFoobarBuilder(matchMap.get("project"), matchMap.get("foobar"));
return ofProjectFoobarName(matchMap.get("project"), matchMap.get("foobar"));
} else if (PROJECT_VARIANT_FOOBAR.matches(formattedString)) {
Map<String, String> matchMap = PROJECT_VARIANT_FOOBAR.match(formattedString);
return ofProjectVariantFoobarBuilder(
return ofProjectVariantFoobarName(
matchMap.get("project"), matchMap.get("variant"), matchMap.get("foobar"));
} else if (FOOBAR.matches(formattedString)) {
Map<String, String> matchMap = FOOBAR.match(formattedString);
return ofFoobarBuilder(matchMap.get("foobar"));
return ofFoobarName(matchMap.get("foobar"));
} else if (BAR_FOO_FOOBAR.matches(formattedString)) {
Map<String, String> matchMap = BAR_FOO_FOOBAR.match(formattedString);
return ofBarFooFoobarBuilder(matchMap.get("bar_foo"), matchMap.get("foobar"));
return ofBarFooFoobarName(matchMap.get("bar_foo"), matchMap.get("foobar"));
}
throw new ValidationException("FoobarName.parse: formattedString not in valid format");
}
Expand Down