@@ -0,0 +1,1812 @@
+/*%0A * Copyright 2019 Michael Rozumyanskiy%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage io.michaelrocks.lightsaber;%0A%0Aimport javax.annotation.Nonnull;%0Aimport javax.inject.Provider;%0A%0A/**%0A * Intercepts dependency %7B@link Provider%7D resolving. Can be used to replace real providers with mocks in tests.%0A */%0Apublic interface ProviderInterceptor %7B%0A  /**%0A   * This method is called when the %7B@link Injector%7D is requested to resolve a %7B@link Provider%7D for the given key.%0A   *%0A   * @param chain%0A   *     An interceptor %7B@link Chain%7D that contains provision parameters and can be used to proceed with the default resolution.%0A   * @param key%0A   *     The %7B@link Key%7D to resolve a %7B@link Provider%7D for.%0A   * @return A %7B@link Provider%7D that will be returned for the given key.%0A   */%0A  @Nonnull%0A  Provider%3C?%3E intercept(@Nonnull Chain chain, @Nonnull Key%3C?%3E key);%0A%0A  interface Chain %7B%0A    /** @return The %7B@link Injector%7D used to resolve a %7B@link Provider%7D. */%0A    @Nonnull%0A    Injector injector();%0A%0A    /**%0A     * Proceed with the default %7B@link Provider%7D resolution.%0A     *%0A     * @param key%0A     *     The %7B@link Key%7D to resolve a %7B@link Provider%7D for.%0A     * @return A %7B@link Provider%7D that will be returned for the given key.%0A     */%0A    @Nonnull%0A    Provider%3C?%3E proceed(@Nonnull Key%3C?%3E key);%0A  %7D%0A%7D%0A

Add an interface for Provider interception