Retrofit源码分析

来源:互联网 发布:软件测试整体策略 编辑:程序博客网 时间:2024/05/22 20:39
OkHttpCallServiceMethod serviceMethod = serviceMethod;    Object[] args = args;ExecutorCallbackCall<T> implements Call<T>Executor callbackExecutor;    Call<T> delegate;ParameterHandlerRelativeUrlServiceMethodthis.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);CallAdapterType responseType();<R> T adapt(Call<R> call)Retrofitboolean validateEagerly=falseHttpUrl baseUrlPlatform platform=Platform.get()List<Converter.Factory> converterFactories BuiltInConvertersGsonConverterFactory.create()ScalarsConverterFactory.create()List<CallAdapter.Factory> adapterFactoriesExecutorCallAdapterFactory(MainThreadExecutor)okhttp3.Call.Factory callFactory=OkHttpClientExecutor callbackExecutor=MainThreadExecutorExecutorCallAdapterFactoryExecutor callbackExecutorAndroidExecutor MainThreadExecutorCallAdapter.Factory

0 0
原创粉丝点击