Can dagger injection done in static method?
<p>I have this network module . I want to inject Network module in static method of ErrorUtils.</p>

<pre><code>@Module
public class NetworkModule {
    private final String END_POINT = "https://www.myurl.com/";

    @Provides
    @Singleton
    public OkHttpClient getOkHttpClient() {
            OkHttpClient okHttpClient = builder.build();
            return okHttpClient;
       }

    @Provides
    @Singleton
    public GsonConverterFactory getGsonConverterFactory() {
        return GsonConverterFactory.create();
    }

    @Provides
    @Singleton
    public Retrofit getRetrofit(OkHttpClient okHttpClient, GsonConverterFactory gsonConverterFactory) {
        return new Retrofit.Builder()
                .baseUrl(END_POINT)
                .client(okHttpClient)
                .addConverterFactory(gsonConverterFactory)
                .build();
    }

    @Provides
    @Singleton
    public RetrofitService getRetrofitService(Retrofit retrofit) {
        return retrofit.create(RetrofitService.class);
    }
</code></pre>

<p>And I want  to inject this  module in static method as :</p>

<pre><code>public class ErrorUtils {
    @Inject
    static Retrofit retrofit;

    public static RestError parseError(Response&lt;?&gt; response) {

        **//showing error while writing this line**

        MyApplication.getComponent().inject(ErrorUtils.class);
        Converter&lt;ResponseBody, RestError&gt; converter = retrofit.responseBodyConverter(RestError.class, new Annotation[0]);

        RestError error;

        try {
            error = converter.convert(response.errorBody());
        } catch (IOException e) {
            return new RestError();
        }

        return error;
    }
}
</code></pre>

<p>How can we inject module in static method ,any suggestion ?</p>