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 class
ClassLoaderProvider.Default
static class
ClassLoaderProvider.System
-
Method Summary
Modifier and Type Method Description static ClassLoaderProvider
New(ClassLoader classLoader)
ClassLoader
provideClassLoader(String typeName)
Provides theClassLoader
instance to be used withXReflect.resolveType(String, ClassLoader)
to resolve the passed typeName.
The typeName should usually not be required to determine the returnedClassLoader
.static ClassLoaderProvider
System()
static ClassLoader
systemClassLoader()
TheClassLoader
used by the defaultClassLoaderProvider
implementation.
-
Method Details
-
provideClassLoader
Provides theClassLoader
instance 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 responsibleClassLoader
has 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
ClassLoader
instance to be used to resolve the passed type name.
-
systemClassLoader
TheClassLoader
used by the defaultClassLoaderProvider
implementation.- Returns:
ClassLoader.getSystemClassLoader()
-
New
-
System
-