OkHttpCall
ServiceMethod serviceMethod = serviceMethod;
Object[] args = args;
ExecutorCallbackCall<T> implements Call<T>
Executor callbackExecutor;
Call<T> delegate;
ParameterHandler
RelativeUrl
ServiceMethod
this.retrofit = retrofit;
this.method = method;
this.methodAnnotations = method.getAnnotations();
this.parameterTypes = method.getGenericParameterTypes();
this.parameterAnnotationsArray = method.getParameterAnnotations();
CallAdapter<?> callAdapter = createCallAdapter();
responseType = callAdapter.responseType();
responseConverter = createResponseConverter()
this.httpMethod = httpMethod;
this.hasBody = hasBody;
this.relativeUrl = value;
this.relativeUrlParamNames = parsePathParameters(value);
CallAdapter
Type responseType();
<R> T adapt(Call<R> call)
Retrofit
boolean validateEagerly=false
HttpUrl baseUrl
Platform platform=Platform.get()
List<Converter.Factory> converterFactories
BuiltInConverters
GsonConverterFactory.create()
ScalarsConverterFactory.create()
List<CallAdapter.Factory> adapterFactories
ExecutorCallAdapterFactory(MainThreadExecutor)
okhttp3.Call.Factory callFactory=OkHttpClient
Executor callbackExecutor=MainThreadExecutor
ExecutorCallAdapterFactory
Executor callbackExecutor
Android
Executor MainThreadExecutor
CallAdapter.Factory
Retrofit源码分析
最新推荐文章于 2024-04-28 15:19:48 发布