Interface SubclassLoader
-
- All Known Implementing Classes:
SubclassInjectionLoader,SubclassInjectionLoader.WithIsolatedLoader,SubclassInjectionLoader.WithLookup,SubclassInjectionLoader.WithReflection
public interface SubclassLoaderA subclass loader is responsible for resolving a class loading strategy for a mock that is implemented as a subclass.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisDisrespectingOpenness()Checks if this loader does not require a module to be open.net.bytebuddy.dynamic.loading.ClassLoadingStrategy<java.lang.ClassLoader>resolveStrategy(java.lang.Class<?> mockedType, java.lang.ClassLoader classLoader, boolean localMock)Resolves a class loading strategy.
-
-
-
Method Detail
-
isDisrespectingOpenness
boolean isDisrespectingOpenness()
Checks if this loader does not require a module to be open.- Returns:
trueif this loader is not constraint to a target module being opened for loading a class.
-
resolveStrategy
net.bytebuddy.dynamic.loading.ClassLoadingStrategy<java.lang.ClassLoader> resolveStrategy(java.lang.Class<?> mockedType, java.lang.ClassLoader classLoader, boolean localMock)Resolves a class loading strategy.- Parameters:
mockedType- The type being mocked.classLoader- The class loader being used.localMock-trueif the mock is loaded within the runtime package of the mocked type.- Returns:
- An appropriate class loading strategy.
-
-