| /* |
| * Copyright (c) 2017 Mockito contributors |
| * This program is made available under the terms of the MIT License. |
| */ |
| package org.mockito.internal.creation.bytebuddy; |
| |
| import net.bytebuddy.dynamic.loading.ClassLoadingStrategy; |
| |
| /** |
| * A subclass loader is responsible for resolving a class loading strategy for a mock that is implemented as a subclass. |
| */ |
| public interface SubclassLoader { |
| |
| /** |
| * Resolves a class loading strategy. |
| * |
| * @param mockedType The type being mocked. |
| * @param classLoader The class loader being used. |
| * @param codegen {@code true} if the mock is loaded in the {@code org.mockito.codegen} package. |
| * @return An appropriate class loading strategy. |
| */ |
| ClassLoadingStrategy<ClassLoader> resolveStrategy(Class<?> mockedType, ClassLoader classLoader, boolean codegen); |
| } |