Class ClassLoaderHelper
java.lang.Object
software.amazon.awssdk.utils.ClassLoaderHelper
- 
Method SummaryModifier and TypeMethodDescriptionstatic ClassLoaderclassLoader(Class<?>... classes) Attempt to get class loader that loads the classes and fallback to the thread context classloader if null.static ClassLoaderAttempt to get the current thread's class loader and fallback to the system classloader if nullstatic Class<?> If classesFirst is false, loads the class via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the caller class loader as the last resort.static Class<?> Loads the class via the optionally specified classes in the order of their specification, and if not found, via the context class loader of the current thread, and if not found, from the caller class loader as the last resort.
- 
Method Details- 
loadClassLoads the class via the optionally specified classes in the order of their specification, and if not found, via the context class loader of the current thread, and if not found, from the caller class loader as the last resort.- Parameters:
- fqcn- fully qualified class name of the target class to be loaded
- classes- class loader providers
- Returns:
- the class loaded; never null
- Throws:
- ClassNotFoundException- if failed to load the class
 
- 
loadClasspublic static Class<?> loadClass(String fqcn, boolean classesFirst, Class<?>... classes) throws ClassNotFoundException If classesFirst is false, loads the class via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the caller class loader as the last resort.If classesFirst is true, loads the class via the optionally specified classes in the order of their specification, and if not found, via the context class loader of the current thread, and if not found, from the caller class loader as the last resort. - Parameters:
- fqcn- fully qualified class name of the target class to be loaded
- classesFirst- true if the class loaders of the optionally specified classes take precedence over the context class loader of the current thread; false if the opposite is true.
- classes- class loader providers
- Returns:
- the class loaded; never null
- Throws:
- ClassNotFoundException- if failed to load the class
 
- 
contextClassLoaderAttempt to get the current thread's class loader and fallback to the system classloader if null- Returns:
- a ClassLoaderor null if none found
 
- 
classLoaderAttempt to get class loader that loads the classes and fallback to the thread context classloader if null.- Parameters:
- classes- the classes
- Returns:
- a ClassLoaderor null if none found
 
 
-