public class SyncResponseClassSpec extends PaginatorsClassSpec
ClassSpec to generate the response class for sync paginated operations.| Modifier and Type | Field and Description |
|---|---|
protected static String |
ITERATOR_METHOD |
c2jOperationName, CLIENT_MEMBER, HAS_NEXT_PAGE_METHOD, LAST_SUCCESSFUL_PAGE_LITERAL, model, NEXT_PAGE_FETCHER_MEMBER, NEXT_PAGE_METHOD, operationModel, paginationDocs, paginatorDefinition, poetExtensions, PREVIOUS_PAGE_METHOD_ARGUMENT, REQUEST_MEMBER, RESPONSE_LITERAL, RESUME_METHOD, typeProvider| Constructor and Description |
|---|
SyncResponseClassSpec(IntermediateModel model,
String c2jOperationName,
PaginatorDefinition paginatorDefinition) |
| Modifier and Type | Method and Description |
|---|---|
com.squareup.javapoet.ClassName |
className() |
protected com.squareup.javapoet.MethodSpec |
constructor() |
protected Stream<com.squareup.javapoet.FieldSpec> |
fields() |
protected com.squareup.javapoet.ClassName |
getClientInterfaceName() |
protected com.squareup.javapoet.MethodSpec |
iteratorMethod()
A
MethodSpec for the overridden iterator() method which is inherited
from the interface. |
protected String |
nextPageFetcherArgument() |
protected com.squareup.javapoet.TypeSpec.Builder |
nextPageFetcherClass()
Generates a inner class that implements
SyncPageFetcher. |
com.squareup.javapoet.TypeSpec |
poetSpec() |
protected com.squareup.javapoet.FieldSpec |
syncClientInterfaceField() |
codeToGetNextPageIfOldResponseIsNotNull, constructRequestFromLastPage, fluentGetterMethodForResponseMember, fluentGetterMethodsForOutputToken, getIteratorLambdaBlock, getTypeForResultKey, hasNextPageMethodBody, memberModelForResponseMember, nextPageFetcherClassName, nextPageMethodBody, requestClassField, requestType, responseType, resumeMethodBuilderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstaticImportsprotected static final String ITERATOR_METHOD
public SyncResponseClassSpec(IntermediateModel model, String c2jOperationName, PaginatorDefinition paginatorDefinition)
public com.squareup.javapoet.TypeSpec poetSpec()
PoetSpec.builder()... implementationpublic com.squareup.javapoet.ClassName className()
protected com.squareup.javapoet.ClassName getClientInterfaceName()
ClassName for the sync client interfaceprotected Stream<com.squareup.javapoet.FieldSpec> fields()
protected com.squareup.javapoet.FieldSpec syncClientInterfaceField()
protected com.squareup.javapoet.MethodSpec constructor()
protected com.squareup.javapoet.MethodSpec iteratorMethod()
MethodSpec for the overridden iterator() method which is inherited
from the interface.protected String nextPageFetcherArgument()
protected com.squareup.javapoet.TypeSpec.Builder nextPageFetcherClass()
SyncPageFetcher. An instance of this class
is passed to PaginatedResponsesIterator to be used while iterating through pages.Copyright © 2023. All rights reserved.