Search in sources :

Example 6 with MethodInvocationExpr

use of com.google.api.generator.engine.ast.MethodInvocationExpr in project gapic-generator-java by googleapis.

the class AbstractServiceClientClassComposer method buildNestedSetterInvocationExpr.

@VisibleForTesting
static MethodInvocationExpr buildNestedSetterInvocationExpr(MethodArgument argument, Expr referenceExpr) {
    String argumentName = JavaStyle.toLowerCamelCase(argument.name());
    TypeNode argumentType = argument.type();
    Expr argVarExpr = VariableExpr.withVariable(Variable.builder().setName(argumentName).setType(argumentType).build());
    if (argument.isResourceNameHelper()) {
        Expr nullExpr = ValueExpr.createNullExpr();
        Expr isNullCheckExpr = RelationalOperationExpr.equalToWithExprs(argVarExpr, nullExpr);
        MethodInvocationExpr toStringExpr = MethodInvocationExpr.builder().setExprReferenceExpr(argVarExpr).setMethodName("toString").setReturnType(TypeNode.STRING).build();
        argVarExpr = TernaryExpr.builder().setConditionExpr(isNullCheckExpr).setThenExpr(nullExpr).setElseExpr(toStringExpr).build();
    }
    String setterMethodName = String.format(typeToSetterMethodName(argumentType), JavaStyle.toUpperCamelCase(argumentName));
    return MethodInvocationExpr.builder().setExprReferenceExpr(referenceExpr).setMethodName(setterMethodName).setArguments(argVarExpr).build();
}
Also used : ReferenceConstructorExpr(com.google.api.generator.engine.ast.ReferenceConstructorExpr) ValueExpr(com.google.api.generator.engine.ast.ValueExpr) NewObjectExpr(com.google.api.generator.engine.ast.NewObjectExpr) Expr(com.google.api.generator.engine.ast.Expr) TernaryExpr(com.google.api.generator.engine.ast.TernaryExpr) RelationalOperationExpr(com.google.api.generator.engine.ast.RelationalOperationExpr) AssignmentExpr(com.google.api.generator.engine.ast.AssignmentExpr) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) CastExpr(com.google.api.generator.engine.ast.CastExpr) LambdaExpr(com.google.api.generator.engine.ast.LambdaExpr) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) TypeNode(com.google.api.generator.engine.ast.TypeNode) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Example 7 with MethodInvocationExpr

use of com.google.api.generator.engine.ast.MethodInvocationExpr in project gapic-generator-java by googleapis.

the class AbstractServiceClientTestClassComposer method createRpcExceptionTestStatements.

protected List<Statement> createRpcExceptionTestStatements(Method method, List<MethodArgument> methodSignature, Map<String, VariableExpr> classMemberVarExprs, Map<String, ResourceName> resourceNames, Map<String, Message> messageTypes) {
    List<VariableExpr> argVarExprs = new ArrayList<>();
    List<Expr> tryBodyExprs = new ArrayList<>();
    if (methodSignature.isEmpty()) {
        // Construct the actual request.
        VariableExpr varExpr = VariableExpr.withVariable(Variable.builder().setType(method.inputType()).setName("request").build());
        argVarExprs.add(varExpr);
        Message requestMessage = messageTypes.get(method.inputType().reference().fullName());
        Preconditions.checkNotNull(requestMessage);
        Map<String, String> valuePatterns = Collections.emptyMap();
        if (getTransportContext().useValuePatterns() && method.hasHttpBindings()) {
            valuePatterns = method.httpBindings().getPathParametersValuePatterns();
        }
        Expr valExpr = DefaultValueComposer.createSimpleMessageBuilderValue(requestMessage, resourceNames, messageTypes, valuePatterns);
        tryBodyExprs.add(AssignmentExpr.builder().setVariableExpr(varExpr.toBuilder().setIsDecl(true).build()).setValueExpr(valExpr).build());
    } else {
        Map<String, String> valuePatterns = Collections.emptyMap();
        if (getTransportContext().useValuePatterns() && method.hasHttpBindings()) {
            valuePatterns = method.httpBindings().getPathParametersValuePatterns();
        }
        for (MethodArgument methodArg : methodSignature) {
            String methodArgName = JavaStyle.toLowerCamelCase(methodArg.name());
            VariableExpr varExpr = VariableExpr.withVariable(Variable.builder().setType(methodArg.type()).setName(methodArgName).build());
            argVarExprs.add(varExpr);
            Expr valExpr = DefaultValueComposer.createMethodArgValue(methodArg, resourceNames, messageTypes, valuePatterns);
            tryBodyExprs.add(AssignmentExpr.builder().setVariableExpr(varExpr.toBuilder().setIsDecl(true).build()).setValueExpr(valExpr).build());
        }
    }
    String rpcJavaName = JavaStyle.toLowerCamelCase(method.name());
    if (method.hasLro()) {
        rpcJavaName += "Async";
    }
    MethodInvocationExpr rpcJavaMethodInvocationExpr = MethodInvocationExpr.builder().setExprReferenceExpr(classMemberVarExprs.get("client")).setMethodName(rpcJavaName).setArguments(argVarExprs.stream().map(e -> (Expr) e).collect(Collectors.toList())).build();
    if (method.hasLro()) {
        rpcJavaMethodInvocationExpr = MethodInvocationExpr.builder().setExprReferenceExpr(rpcJavaMethodInvocationExpr).setMethodName("get").build();
    }
    tryBodyExprs.add(rpcJavaMethodInvocationExpr);
    VariableExpr catchExceptionVarExpr = VariableExpr.builder().setVariable(Variable.builder().setType(TypeNode.withExceptionClazz(method.hasLro() ? ExecutionException.class : InvalidArgumentException.class)).setName("e").build()).build();
    List<Statement> catchBody = method.hasLro() ? createRpcLroExceptionTestCatchBody(catchExceptionVarExpr, false) : Arrays.asList(CommentStatement.withComment(LineComment.withComment("Expected exception.")));
    // Assert a failure if no exception was raised.
    tryBodyExprs.add(MethodInvocationExpr.builder().setStaticReferenceType(FIXED_TYPESTORE.get("Assert")).setMethodName("fail").setArguments(ValueExpr.withValue(StringObjectValue.withValue("No exception raised"))).build());
    TryCatchStatement tryCatchBlock = TryCatchStatement.builder().setTryBody(tryBodyExprs.stream().map(e -> ExprStatement.withExpr(e)).collect(Collectors.toList())).addCatch(catchExceptionVarExpr.toBuilder().setIsDecl(true).build(), catchBody).build();
    return Arrays.asList(EMPTY_LINE_STATEMENT, tryCatchBlock);
}
Also used : Arrays(java.util.Arrays) Reference(com.google.api.generator.engine.ast.Reference) Variable(com.google.api.generator.engine.ast.Variable) NoCredentialsProvider(com.google.api.gax.core.NoCredentialsProvider) StringObjectValue(com.google.api.generator.engine.ast.StringObjectValue) DefaultValueComposer(com.google.api.generator.gapic.composer.defaultvalue.DefaultValueComposer) Field(com.google.api.generator.gapic.model.Field) Generated(javax.annotation.Generated) MethodDefinition(com.google.api.generator.engine.ast.MethodDefinition) TypeStore(com.google.api.generator.gapic.composer.store.TypeStore) Method(com.google.api.generator.gapic.model.Method) MethodArgument(com.google.api.generator.gapic.model.MethodArgument) PrimitiveValue(com.google.api.generator.engine.ast.PrimitiveValue) Map(java.util.Map) After(org.junit.After) ServerStreamingCallable(com.google.api.gax.rpc.ServerStreamingCallable) ConcreteReference(com.google.api.generator.engine.ast.ConcreteReference) AfterClass(org.junit.AfterClass) ApiClientHeaderProvider(com.google.api.gax.rpc.ApiClientHeaderProvider) ScopeNode(com.google.api.generator.engine.ast.ScopeNode) UUID(java.util.UUID) EmptyLineStatement(com.google.api.generator.engine.ast.EmptyLineStatement) Collectors(java.util.stream.Collectors) ApiStreamObserver(com.google.api.gax.rpc.ApiStreamObserver) ClassNames(com.google.api.generator.gapic.composer.utils.ClassNames) List(java.util.List) Optional(java.util.Optional) Any(com.google.protobuf.Any) GapicContext(com.google.api.generator.gapic.model.GapicContext) ValueExpr(com.google.api.generator.engine.ast.ValueExpr) VaporReference(com.google.api.generator.engine.ast.VaporReference) TypeNode(com.google.api.generator.engine.ast.TypeNode) BeforeClass(org.junit.BeforeClass) BidiStreamingCallable(com.google.api.gax.rpc.BidiStreamingCallable) Kind(com.google.api.generator.gapic.model.GapicClass.Kind) ClassDefinition(com.google.api.generator.engine.ast.ClassDefinition) Operation(com.google.longrunning.Operation) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Expr(com.google.api.generator.engine.ast.Expr) Lists(com.google.common.collect.Lists) ClientStreamingCallable(com.google.api.gax.rpc.ClientStreamingCallable) TryCatchStatement(com.google.api.generator.engine.ast.TryCatchStatement) LineComment(com.google.api.generator.engine.ast.LineComment) Before(org.junit.Before) AssignmentExpr(com.google.api.generator.engine.ast.AssignmentExpr) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) AbstractMessage(com.google.protobuf.AbstractMessage) CommentStatement(com.google.api.generator.engine.ast.CommentStatement) IOException(java.io.IOException) Test(org.junit.Test) ExprStatement(com.google.api.generator.engine.ast.ExprStatement) AnnotationNode(com.google.api.generator.engine.ast.AnnotationNode) GapicClass(com.google.api.generator.gapic.model.GapicClass) ResourceName(com.google.api.generator.gapic.model.ResourceName) ExecutionException(java.util.concurrent.ExecutionException) Statement(com.google.api.generator.engine.ast.Statement) Service(com.google.api.generator.gapic.model.Service) InvalidArgumentException(com.google.api.gax.rpc.InvalidArgumentException) JavaStyle(com.google.api.generator.gapic.utils.JavaStyle) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) Preconditions(com.google.common.base.Preconditions) StatusCode(com.google.api.gax.rpc.StatusCode) Assert(org.junit.Assert) Message(com.google.api.generator.gapic.model.Message) Collections(java.util.Collections) AbstractMessage(com.google.protobuf.AbstractMessage) Message(com.google.api.generator.gapic.model.Message) MethodArgument(com.google.api.generator.gapic.model.MethodArgument) EmptyLineStatement(com.google.api.generator.engine.ast.EmptyLineStatement) TryCatchStatement(com.google.api.generator.engine.ast.TryCatchStatement) CommentStatement(com.google.api.generator.engine.ast.CommentStatement) ExprStatement(com.google.api.generator.engine.ast.ExprStatement) Statement(com.google.api.generator.engine.ast.Statement) ArrayList(java.util.ArrayList) TryCatchStatement(com.google.api.generator.engine.ast.TryCatchStatement) ValueExpr(com.google.api.generator.engine.ast.ValueExpr) Expr(com.google.api.generator.engine.ast.Expr) AssignmentExpr(com.google.api.generator.engine.ast.AssignmentExpr) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) VariableExpr(com.google.api.generator.engine.ast.VariableExpr)

Example 8 with MethodInvocationExpr

use of com.google.api.generator.engine.ast.MethodInvocationExpr in project gapic-generator-java by googleapis.

the class AbstractServiceSettingsClassComposer method createNestedBuilderApplyToAllUnaryMethod.

private static MethodDefinition createNestedBuilderApplyToAllUnaryMethod(Service service, TypeStore typeStore) {
    TypeNode builderType = typeStore.get(BUILDER_CLASS_NAME);
    String javaMethodName = "applyToAllUnaryMethods";
    TypeNode unaryCallSettingsType = TypeNode.withReference(ConcreteReference.builder().setClazz(UnaryCallSettings.Builder.class).setGenerics(Arrays.asList(TypeNode.WILDCARD_REFERENCE, TypeNode.WILDCARD_REFERENCE)).build());
    VariableExpr settingsUpdaterVarExpr = VariableExpr.withVariable(Variable.builder().setName("settingsUpdater").setType(TypeNode.withReference(FIXED_TYPESTORE.get("ApiFunction").reference().copyAndSetGenerics(Arrays.asList(unaryCallSettingsType.reference(), TypeNode.VOID_OBJECT.reference())))).build());
    MethodInvocationExpr builderMethodExpr = MethodInvocationExpr.builder().setMethodName("getStubSettingsBuilder").build();
    builderMethodExpr = MethodInvocationExpr.builder().setExprReferenceExpr(builderMethodExpr).setMethodName("unaryMethodSettingsBuilders").build();
    MethodInvocationExpr applyMethodExpr = MethodInvocationExpr.builder().setExprReferenceExpr(ValueExpr.withValue(SuperObjectValue.withType(TypeNode.withReference(ConcreteReference.withClazz(ClientSettings.Builder.class))))).setMethodName(javaMethodName).setArguments(Arrays.asList(builderMethodExpr, settingsUpdaterVarExpr)).build();
    return MethodDefinition.builder().setHeaderCommentStatements(SettingsCommentComposer.APPLY_TO_ALL_UNARY_METHODS_METHOD_COMMENTS).setScope(ScopeNode.PUBLIC).setReturnType(builderType).setName(javaMethodName).setArguments(Arrays.asList(settingsUpdaterVarExpr.toBuilder().setIsDecl(true).build())).setBody(Arrays.asList(ExprStatement.withExpr(applyMethodExpr))).setReturnExpr(ValueExpr.withValue(ThisObjectValue.withType(builderType))).build();
}
Also used : MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) TypeNode(com.google.api.generator.engine.ast.TypeNode)

Example 9 with MethodInvocationExpr

use of com.google.api.generator.engine.ast.MethodInvocationExpr in project gapic-generator-java by googleapis.

the class AbstractServiceSettingsClassComposer method createNestedBuilderConstructorMethods.

private static List<MethodDefinition> createNestedBuilderConstructorMethods(Service service, TypeStore typeStore) {
    TypeNode builderType = typeStore.get(BUILDER_CLASS_NAME);
    MethodDefinition noArgCtor = MethodDefinition.constructorBuilder().setScope(ScopeNode.PROTECTED).setReturnType(builderType).setThrowsExceptions(Arrays.asList(FIXED_TYPESTORE.get("IOException"))).setBody(Arrays.asList(ExprStatement.withExpr(ReferenceConstructorExpr.thisBuilder().setType(builderType).setArguments(CastExpr.builder().setType(FIXED_TYPESTORE.get("ClientContext")).setExpr(ValueExpr.createNullExpr()).build()).build()))).build();
    BiFunction<VariableExpr, Expr, MethodDefinition> ctorMakerFn = (ctorArg, superArg) -> MethodDefinition.constructorBuilder().setScope(ScopeNode.PROTECTED).setReturnType(builderType).setArguments(Arrays.asList(ctorArg.toBuilder().setIsDecl(true).build())).setBody(Arrays.asList(ExprStatement.withExpr(ReferenceConstructorExpr.superBuilder().setType(FIXED_TYPESTORE.get("ClientSettings")).setArguments(superArg).build()))).build();
    VariableExpr clientContextVarExpr = VariableExpr.withVariable(Variable.builder().setName("clientContext").setType(FIXED_TYPESTORE.get("ClientContext")).build());
    MethodDefinition clientContextCtor = ctorMakerFn.apply(clientContextVarExpr, MethodInvocationExpr.builder().setStaticReferenceType(typeStore.get(ClassNames.getServiceStubSettingsClassName(service))).setMethodName("newBuilder").setArguments(Arrays.asList(clientContextVarExpr)).build());
    VariableExpr settingsVarExpr = VariableExpr.withVariable(Variable.builder().setName("settings").setType(typeStore.get(ClassNames.getServiceSettingsClassName(service))).build());
    MethodInvocationExpr settingsBuilderMethodExpr = MethodInvocationExpr.builder().setExprReferenceExpr(settingsVarExpr).setMethodName("getStubSettings").build();
    settingsBuilderMethodExpr = MethodInvocationExpr.builder().setExprReferenceExpr(settingsBuilderMethodExpr).setMethodName("toBuilder").build();
    MethodDefinition settingsCtor = ctorMakerFn.apply(settingsVarExpr, settingsBuilderMethodExpr);
    TypeNode stubSettingsBuilderType = getStubSettingsBuilderType(service);
    VariableExpr stubSettingsVarExpr = VariableExpr.withVariable(Variable.builder().setName("stubSettings").setType(stubSettingsBuilderType).build());
    MethodDefinition stubSettingsCtor = ctorMakerFn.apply(stubSettingsVarExpr, stubSettingsVarExpr);
    return Arrays.asList(noArgCtor, clientContextCtor, settingsCtor, stubSettingsCtor);
}
Also used : Arrays(java.util.Arrays) ClientSettings(com.google.api.gax.rpc.ClientSettings) BiFunction(java.util.function.BiFunction) Reference(com.google.api.generator.engine.ast.Reference) ServerStreamingCallSettings(com.google.api.gax.rpc.ServerStreamingCallSettings) ReferenceConstructorExpr(com.google.api.generator.engine.ast.ReferenceConstructorExpr) ThisObjectValue(com.google.api.generator.engine.ast.ThisObjectValue) Variable(com.google.api.generator.engine.ast.Variable) PagedCallSettings(com.google.api.gax.rpc.PagedCallSettings) Generated(javax.annotation.Generated) MethodDefinition(com.google.api.generator.engine.ast.MethodDefinition) TypeStore(com.google.api.generator.gapic.composer.store.TypeStore) Method(com.google.api.generator.gapic.model.Method) StreamingCallSettings(com.google.api.gax.rpc.StreamingCallSettings) Stream(com.google.api.generator.gapic.model.Method.Stream) ConcreteReference(com.google.api.generator.engine.ast.ConcreteReference) ApiClientHeaderProvider(com.google.api.gax.rpc.ApiClientHeaderProvider) SettingsSampleComposer(com.google.api.generator.gapic.composer.samplecode.SettingsSampleComposer) ScopeNode(com.google.api.generator.engine.ast.ScopeNode) Collectors(java.util.stream.Collectors) ClassNames(com.google.api.generator.gapic.composer.utils.ClassNames) List(java.util.List) OperationCallSettings(com.google.api.gax.rpc.OperationCallSettings) SampleCodeWriter(com.google.api.generator.gapic.composer.samplecode.SampleCodeWriter) TransportChannelProvider(com.google.api.gax.rpc.TransportChannelProvider) Optional(java.util.Optional) GoogleCredentialsProvider(com.google.api.gax.core.GoogleCredentialsProvider) GapicContext(com.google.api.generator.gapic.model.GapicContext) ApiFunction(com.google.api.core.ApiFunction) ValueExpr(com.google.api.generator.engine.ast.ValueExpr) VaporReference(com.google.api.generator.engine.ast.VaporReference) SettingsCommentComposer(com.google.api.generator.gapic.composer.comment.SettingsCommentComposer) BetaApi(com.google.api.core.BetaApi) TypeNode(com.google.api.generator.engine.ast.TypeNode) Kind(com.google.api.generator.gapic.model.GapicClass.Kind) ClientContext(com.google.api.gax.rpc.ClientContext) ClassDefinition(com.google.api.generator.engine.ast.ClassDefinition) PackageChecker(com.google.api.generator.gapic.composer.utils.PackageChecker) Operation(com.google.longrunning.Operation) Function(java.util.function.Function) ArrayList(java.util.ArrayList) NewObjectExpr(com.google.api.generator.engine.ast.NewObjectExpr) UnaryCallSettings(com.google.api.gax.rpc.UnaryCallSettings) Expr(com.google.api.generator.engine.ast.Expr) ImmutableList(com.google.common.collect.ImmutableList) StubSettings(com.google.api.gax.rpc.StubSettings) BatchingCallSettings(com.google.api.gax.rpc.BatchingCallSettings) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) Iterator(java.util.Iterator) CastExpr(com.google.api.generator.engine.ast.CastExpr) CommentStatement(com.google.api.generator.engine.ast.CommentStatement) IOException(java.io.IOException) ExprStatement(com.google.api.generator.engine.ast.ExprStatement) InstantiatingExecutorProvider(com.google.api.gax.core.InstantiatingExecutorProvider) AnnotationNode(com.google.api.generator.engine.ast.AnnotationNode) Sample(com.google.api.generator.gapic.model.Sample) GapicClass(com.google.api.generator.gapic.model.GapicClass) Service(com.google.api.generator.gapic.model.Service) SuperObjectValue(com.google.api.generator.engine.ast.SuperObjectValue) SampleComposerUtil(com.google.api.generator.gapic.composer.samplecode.SampleComposerUtil) JavaStyle(com.google.api.generator.gapic.utils.JavaStyle) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) Preconditions(com.google.common.base.Preconditions) Collections(java.util.Collections) ReferenceConstructorExpr(com.google.api.generator.engine.ast.ReferenceConstructorExpr) ValueExpr(com.google.api.generator.engine.ast.ValueExpr) NewObjectExpr(com.google.api.generator.engine.ast.NewObjectExpr) Expr(com.google.api.generator.engine.ast.Expr) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) CastExpr(com.google.api.generator.engine.ast.CastExpr) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) MethodDefinition(com.google.api.generator.engine.ast.MethodDefinition) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) TypeNode(com.google.api.generator.engine.ast.TypeNode)

Example 10 with MethodInvocationExpr

use of com.google.api.generator.engine.ast.MethodInvocationExpr in project gapic-generator-java by googleapis.

the class AbstractServiceSettingsClassComposer method createNestedBuilderCreatorMethods.

protected List<MethodDefinition> createNestedBuilderCreatorMethods(Service service, TypeStore typeStore, String newBuilderMethodName, String createDefaultMethodName) {
    MethodInvocationExpr ctorArg = MethodInvocationExpr.builder().setStaticReferenceType(typeStore.get(ClassNames.getServiceStubSettingsClassName(service))).setMethodName(newBuilderMethodName).build();
    TypeNode builderType = typeStore.get(BUILDER_CLASS_NAME);
    return ImmutableList.of(MethodDefinition.builder().setScope(ScopeNode.PRIVATE).setIsStatic(true).setReturnType(builderType).setName(createDefaultMethodName).setReturnExpr(NewObjectExpr.builder().setType(builderType).setArguments(ctorArg).build()).build());
}
Also used : MethodInvocationExpr(com.google.api.generator.engine.ast.MethodInvocationExpr) TypeNode(com.google.api.generator.engine.ast.TypeNode)

Aggregations

MethodInvocationExpr (com.google.api.generator.engine.ast.MethodInvocationExpr)103 VariableExpr (com.google.api.generator.engine.ast.VariableExpr)76 TypeNode (com.google.api.generator.engine.ast.TypeNode)72 AssignmentExpr (com.google.api.generator.engine.ast.AssignmentExpr)59 Expr (com.google.api.generator.engine.ast.Expr)50 ValueExpr (com.google.api.generator.engine.ast.ValueExpr)48 ArrayList (java.util.ArrayList)41 Variable (com.google.api.generator.engine.ast.Variable)39 NewObjectExpr (com.google.api.generator.engine.ast.NewObjectExpr)38 ExprStatement (com.google.api.generator.engine.ast.ExprStatement)36 Statement (com.google.api.generator.engine.ast.Statement)33 List (java.util.List)31 ConcreteReference (com.google.api.generator.engine.ast.ConcreteReference)29 Test (org.junit.Test)29 RelationalOperationExpr (com.google.api.generator.engine.ast.RelationalOperationExpr)27 MethodDefinition (com.google.api.generator.engine.ast.MethodDefinition)26 Arrays (java.util.Arrays)26 JavaStyle (com.google.api.generator.gapic.utils.JavaStyle)25 Map (java.util.Map)25 Function (java.util.function.Function)24