Package com.ibm.icu.impl
Class ClassLoaderUtil
java.lang.Object
com.ibm.icu.impl.ClassLoaderUtil
This utility class is used for resolving a right ClassLoader from
a given class. getClassLoader always returns a non-null ClassLoader
even a class is loaded through the bootstrap class loader of JRE.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ClassLoader
Lazily create a singleton BootstrapClassLoader.static ClassLoader
Returns a fallback class loader.static ClassLoader
getClassLoader
(Class<?> cls) Returns the class loader used for loading the specified class.
-
Field Details
-
BOOTSTRAP_CLASSLOADER
-
-
Constructor Details
-
ClassLoaderUtil
public ClassLoaderUtil()
-
-
Method Details
-
getBootstrapClassLoader
Lazily create a singleton BootstrapClassLoader. This class loader might be necessary when ICU4J classes are initialized by bootstrap class loader.- Returns:
- The BootStrapClassLoader singleton instance
-
getClassLoader
Returns the class loader used for loading the specified class.- Parameters:
cls
- The class- Returns:
- the class loader
-
getClassLoader
Returns a fallback class loader.- Returns:
- A class loader
-