Search in sources :

Example 16 with VariableExpr

use of com.google.api.generator.engine.ast.VariableExpr 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 17 with VariableExpr

use of com.google.api.generator.engine.ast.VariableExpr 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 18 with VariableExpr

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

the class AbstractServiceSettingsClassComposer method createConstructorMethod.

private static MethodDefinition createConstructorMethod(Service service, TypeStore typeStore) {
    VariableExpr settingsBuilderVarExpr = VariableExpr.withVariable(Variable.builder().setName("settingsBuilder").setType(typeStore.get(BUILDER_CLASS_NAME)).build());
    TypeNode thisClassType = typeStore.get(ClassNames.getServiceSettingsClassName(service));
    return MethodDefinition.constructorBuilder().setScope(ScopeNode.PROTECTED).setReturnType(thisClassType).setArguments(Arrays.asList(settingsBuilderVarExpr.toBuilder().setIsDecl(true).build())).setThrowsExceptions(Arrays.asList(FIXED_TYPESTORE.get("IOException"))).setBody(Arrays.asList(ExprStatement.withExpr(ReferenceConstructorExpr.superBuilder().setType(FIXED_TYPESTORE.get("ClientSettings")).setArguments(settingsBuilderVarExpr).build()))).build();
}
Also used : VariableExpr(com.google.api.generator.engine.ast.VariableExpr) TypeNode(com.google.api.generator.engine.ast.TypeNode)

Example 19 with VariableExpr

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

the class AbstractServiceSettingsClassComposer method createCreatorMethod.

private static MethodDefinition createCreatorMethod(Service service, TypeStore typeStore) {
    TypeNode stubClassType = typeStore.get(ClassNames.getServiceStubSettingsClassName(service));
    VariableExpr stubVarExpr = VariableExpr.withVariable(Variable.builder().setName("stub").setType(stubClassType).build());
    TypeNode thisClassType = typeStore.get(ClassNames.getServiceSettingsClassName(service));
    MethodInvocationExpr stubBuilderMethodExpr = MethodInvocationExpr.builder().setExprReferenceExpr(stubVarExpr).setMethodName("toBuilder").build();
    TypeNode stubBuilderType = TypeNode.withReference(VaporReference.builder().setName("Builder").setEnclosingClassNames(ClassNames.getServiceSettingsClassName(service)).setPakkage(service.pakkage()).build());
    Expr returnMethodExpr = NewObjectExpr.builder().setType(stubBuilderType).setArguments(stubBuilderMethodExpr).build();
    returnMethodExpr = MethodInvocationExpr.builder().setExprReferenceExpr(returnMethodExpr).setMethodName("build").setReturnType(thisClassType).build();
    return MethodDefinition.builder().setScope(ScopeNode.PUBLIC).setIsStatic(true).setIsFinal(true).setReturnType(thisClassType).setName("create").setArguments(Arrays.asList(stubVarExpr.toBuilder().setIsDecl(true).build())).setThrowsExceptions(Arrays.asList(FIXED_TYPESTORE.get("IOException"))).setReturnExpr(returnMethodExpr).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) 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) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) TypeNode(com.google.api.generator.engine.ast.TypeNode)

Example 20 with VariableExpr

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

the class AbstractServiceClientClassComposer method createBackgroundResourceMethods.

private static List<MethodDefinition> createBackgroundResourceMethods(Service service, TypeStore typeStore) {
    List<MethodDefinition> methods = new ArrayList<>();
    VariableExpr stubVarExpr = VariableExpr.withVariable(Variable.builder().setType(typeStore.get(ClassNames.getServiceStubClassName(service))).setName("stub").build());
    MethodDefinition closeMethod = MethodDefinition.builder().setIsOverride(true).setScope(ScopeNode.PUBLIC).setIsFinal(true).setReturnType(TypeNode.VOID).setName("close").setBody(Arrays.asList(ExprStatement.withExpr(MethodInvocationExpr.builder().setExprReferenceExpr(stubVarExpr).setMethodName("close").build()))).build();
    methods.add(closeMethod);
    MethodDefinition shutdownMethod = MethodDefinition.builder().setIsOverride(true).setScope(ScopeNode.PUBLIC).setReturnType(TypeNode.VOID).setName("shutdown").setBody(Arrays.asList(ExprStatement.withExpr(MethodInvocationExpr.builder().setExprReferenceExpr(stubVarExpr).setMethodName("shutdown").build()))).build();
    methods.add(shutdownMethod);
    MethodDefinition isShutdownMethod = MethodDefinition.builder().setIsOverride(true).setScope(ScopeNode.PUBLIC).setReturnType(TypeNode.BOOLEAN).setName("isShutdown").setReturnExpr(MethodInvocationExpr.builder().setExprReferenceExpr(stubVarExpr).setMethodName("isShutdown").setReturnType(TypeNode.BOOLEAN).build()).build();
    methods.add(isShutdownMethod);
    MethodDefinition isTerminatedMethod = MethodDefinition.builder().setIsOverride(true).setScope(ScopeNode.PUBLIC).setReturnType(TypeNode.BOOLEAN).setName("isTerminated").setReturnExpr(MethodInvocationExpr.builder().setExprReferenceExpr(stubVarExpr).setMethodName("isTerminated").setReturnType(TypeNode.BOOLEAN).build()).build();
    methods.add(isTerminatedMethod);
    MethodDefinition shutdownNowMethod = MethodDefinition.builder().setIsOverride(true).setScope(ScopeNode.PUBLIC).setReturnType(TypeNode.VOID).setName("shutdownNow").setBody(Arrays.asList(ExprStatement.withExpr(MethodInvocationExpr.builder().setExprReferenceExpr(stubVarExpr).setMethodName("shutdownNow").build()))).build();
    methods.add(shutdownNowMethod);
    List<VariableExpr> arguments = Arrays.asList(VariableExpr.builder().setVariable(Variable.builder().setName("duration").setType(TypeNode.LONG).build()).build(), VariableExpr.builder().setVariable(Variable.builder().setName("unit").setType(typeStore.get("TimeUnit")).build()).build());
    MethodDefinition awaitTerminationMethod = MethodDefinition.builder().setIsOverride(true).setScope(ScopeNode.PUBLIC).setReturnType(TypeNode.BOOLEAN).setName("awaitTermination").setArguments(arguments.stream().map(v -> v.toBuilder().setIsDecl(true).build()).collect(Collectors.toList())).setThrowsExceptions(Arrays.asList(typeStore.get("InterruptedException"))).setReturnExpr(MethodInvocationExpr.builder().setExprReferenceExpr(stubVarExpr).setMethodName("awaitTermination").setArguments(arguments.stream().map(v -> (Expr) v).collect(Collectors.toList())).setReturnType(TypeNode.BOOLEAN).build()).build();
    methods.add(awaitTerminationMethod);
    return methods;
}
Also used : Arrays(java.util.Arrays) ServiceClientHeaderSampleComposer(com.google.api.generator.gapic.composer.samplecode.ServiceClientHeaderSampleComposer) OperationFuture(com.google.api.gax.longrunning.OperationFuture) BiFunction(java.util.function.BiFunction) Reference(com.google.api.generator.engine.ast.Reference) ReferenceConstructorExpr(com.google.api.generator.engine.ast.ReferenceConstructorExpr) ThisObjectValue(com.google.api.generator.engine.ast.ThisObjectValue) Variable(com.google.api.generator.engine.ast.Variable) BackgroundResource(com.google.api.gax.core.BackgroundResource) 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) LongrunningOperation(com.google.api.generator.gapic.model.LongrunningOperation) Stream(com.google.api.generator.gapic.model.Method.Stream) Map(java.util.Map) ServiceClientMethodSampleComposer(com.google.api.generator.gapic.composer.samplecode.ServiceClientMethodSampleComposer) ServerStreamingCallable(com.google.api.gax.rpc.ServerStreamingCallable) ConcreteReference(com.google.api.generator.engine.ast.ConcreteReference) ApiFutures(com.google.api.core.ApiFutures) PageContext(com.google.api.gax.rpc.PageContext) Status(com.google.rpc.Status) Set(java.util.Set) ScopeNode(com.google.api.generator.engine.ast.ScopeNode) ServiceClientCommentComposer(com.google.api.generator.gapic.composer.comment.ServiceClientCommentComposer) Collectors(java.util.stream.Collectors) ApiFuture(com.google.api.core.ApiFuture) Objects(java.util.Objects) ClassNames(com.google.api.generator.gapic.composer.utils.ClassNames) List(java.util.List) ServiceClientCallableMethodSampleComposer(com.google.api.generator.gapic.composer.samplecode.ServiceClientCallableMethodSampleComposer) SampleCodeWriter(com.google.api.generator.gapic.composer.samplecode.SampleCodeWriter) Optional(java.util.Optional) GapicContext(com.google.api.generator.gapic.model.GapicContext) ApiFunction(com.google.api.core.ApiFunction) ValueExpr(com.google.api.generator.engine.ast.ValueExpr) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) BetaApi(com.google.api.core.BetaApi) TypeNode(com.google.api.generator.engine.ast.TypeNode) BidiStreamingCallable(com.google.api.gax.rpc.BidiStreamingCallable) Kind(com.google.api.generator.gapic.model.GapicClass.Kind) ClassDefinition(com.google.api.generator.engine.ast.ClassDefinition) PackageChecker(com.google.api.generator.gapic.composer.utils.PackageChecker) HashMap(java.util.HashMap) GapicMetadata(com.google.gapic.metadata.GapicMetadata) Operation(com.google.longrunning.Operation) Function(java.util.function.Function) ArrayList(java.util.ArrayList) NewObjectExpr(com.google.api.generator.engine.ast.NewObjectExpr) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) Strings(com.google.common.base.Strings) Expr(com.google.api.generator.engine.ast.Expr) TernaryExpr(com.google.api.generator.engine.ast.TernaryExpr) RelationalOperationExpr(com.google.api.generator.engine.ast.RelationalOperationExpr) ClientStreamingCallable(com.google.api.gax.rpc.ClientStreamingCallable) TriFunction(com.google.api.generator.util.TriFunction) AbstractFixedSizeCollection(com.google.api.gax.paging.AbstractFixedSizeCollection) AssignmentExpr(com.google.api.generator.engine.ast.AssignmentExpr) VariableExpr(com.google.api.generator.engine.ast.VariableExpr) Iterator(java.util.Iterator) AbstractPage(com.google.api.gax.paging.AbstractPage) 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) AnnotationNode(com.google.api.generator.engine.ast.AnnotationNode) Sample(com.google.api.generator.gapic.model.Sample) GapicClass(com.google.api.generator.gapic.model.GapicClass) ResourceName(com.google.api.generator.gapic.model.ResourceName) Trie(com.google.api.generator.util.Trie) TimeUnit(java.util.concurrent.TimeUnit) OperationCallable(com.google.api.gax.rpc.OperationCallable) UnaryCallable(com.google.api.gax.rpc.UnaryCallable) Statement(com.google.api.generator.engine.ast.Statement) Service(com.google.api.generator.gapic.model.Service) LambdaExpr(com.google.api.generator.engine.ast.LambdaExpr) 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) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Message(com.google.api.generator.gapic.model.Message) Collections(java.util.Collections) AbstractPagedListResponse(com.google.api.gax.paging.AbstractPagedListResponse) MethodDefinition(com.google.api.generator.engine.ast.MethodDefinition) ArrayList(java.util.ArrayList) VariableExpr(com.google.api.generator.engine.ast.VariableExpr)

Aggregations

VariableExpr (com.google.api.generator.engine.ast.VariableExpr)217 MethodInvocationExpr (com.google.api.generator.engine.ast.MethodInvocationExpr)137 AssignmentExpr (com.google.api.generator.engine.ast.AssignmentExpr)132 TypeNode (com.google.api.generator.engine.ast.TypeNode)118 Expr (com.google.api.generator.engine.ast.Expr)114 ValueExpr (com.google.api.generator.engine.ast.ValueExpr)107 ExprStatement (com.google.api.generator.engine.ast.ExprStatement)91 Variable (com.google.api.generator.engine.ast.Variable)88 NewObjectExpr (com.google.api.generator.engine.ast.NewObjectExpr)87 ArrayList (java.util.ArrayList)87 Test (org.junit.Test)82 Statement (com.google.api.generator.engine.ast.Statement)80 List (java.util.List)64 ConcreteReference (com.google.api.generator.engine.ast.ConcreteReference)62 MethodDefinition (com.google.api.generator.engine.ast.MethodDefinition)58 RelationalOperationExpr (com.google.api.generator.engine.ast.RelationalOperationExpr)56 CastExpr (com.google.api.generator.engine.ast.CastExpr)53 CommentStatement (com.google.api.generator.engine.ast.CommentStatement)53 Arrays (java.util.Arrays)48 IfStatement (com.google.api.generator.engine.ast.IfStatement)47