Package one.microstream.reflect
Interface ClassLoaderProvider
- All Known Implementing Classes:
ClassLoaderProvider.Default,ClassLoaderProvider.System
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ClassLoaderProvider
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classClassLoaderProvider.Defaultstatic classClassLoaderProvider.System -
Method Summary
Modifier and Type Method Description static ClassLoaderProviderNew(ClassLoader classLoader)ClassLoaderprovideClassLoader(String typeName)Provides theClassLoaderinstance to be used withXReflect.resolveType(String,ClassLoader)to resolve the passed typeName.
The typeName should usually not be required to determine the returnedClassLoader.static ClassLoaderProviderSystem()static ClassLoadersystemClassLoader()TheClassLoaderused by the defaultClassLoaderProviderimplementation.
-
Method Details
-
provideClassLoader
Provides theClassLoaderinstance to be used withXReflect.resolveType(String,ClassLoader)to resolve the passed typeName.
The typeName should usually not be required to determine the returnedClassLoader. It is just an optionally available information in case the responsibleClassLoaderhas to be determined based on the specific type (e.g. the package path or a sub path of it).- Parameters:
typeName- the full qualified name of the type to be resolved.- Returns:
- the
ClassLoaderinstance to be used to resolve the passed type name.
-
systemClassLoader
TheClassLoaderused by the defaultClassLoaderProviderimplementation.- Returns:
ClassLoader.getSystemClassLoader()
-
New
-
System
-