Package io.microsphere.util
Class ClassLoaderUtils
- java.lang.Object
-
- io.microsphere.util.ClassLoaderUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClassLoaderUtils.ResourceTypeResource Type
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.management.ClassLoadingMXBeanclassLoadingMXBean
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.Class<?>doLoadClass(java.lang.ClassLoader classLoader, java.lang.String className)static java.util.Set<java.net.URL>findAllClassPathURLs(java.lang.ClassLoader classLoader)static java.lang.Class<?>findLoadedClass(java.lang.ClassLoader classLoader, java.lang.String className)Find LoadedClassunder specified inheritableClassLoaderstatic java.util.Set<java.lang.Class<?>>findLoadedClasses(java.lang.ClassLoader classLoader, java.lang.Iterable<java.lang.String> classNames)Find LoadedClassunder specified inheritableClassLoaderand class namesstatic java.util.Set<java.lang.Class<?>>findLoadedClasses(java.lang.ClassLoader classLoader, java.lang.String... classNames)Find LoadedClassunder specified inheritableClassLoaderand class namesstatic java.util.Set<java.lang.Class<?>>findLoadedClassesInClassPath(java.lang.ClassLoader classLoader)Find loaded classesSetin class pathstatic java.util.Set<java.lang.Class<?>>findLoadedClassesInClassPath(java.lang.ClassLoader classLoader, java.lang.String classPath)Find loaded classesSetin class pathstatic java.util.Set<java.lang.Class<?>>findLoadedClassesInClassPaths(java.lang.ClassLoader classLoader, java.util.Set<java.lang.String> classPaths)Find loaded classesSetin class pathsSetstatic java.net.URLClassLoaderfindURLClassLoader(java.lang.ClassLoader classLoader)static java.util.Set<java.lang.Class<?>>getAllLoadedClasses(java.lang.ClassLoader classLoader)Get all loaded classesSetunder specified inheritableClassLoaderstatic java.util.Map<java.lang.ClassLoader,java.util.Set<java.lang.Class<?>>>getAllLoadedClassesMap(java.lang.ClassLoader classLoader)Get all loaded classesMapunder specified inheritableClassLoader,ClassLoaderas key , its loaded classesSetas value.static java.lang.ClassLoadergetCallerClassLoader()Return the ClassLoader from the caller classstatic java.lang.ClassLoadergetClassLoader(java.lang.Class<?> loadedClass)Get the ClassLoader from the loaded class if present.static java.net.URLgetClassResource(java.lang.Class<?> type)Get theClassresource URL under specifiedClassstatic java.net.URLgetClassResource(java.lang.ClassLoader classLoader, java.lang.Class<?> type)Get theClassresource URL under specifiedClassstatic java.net.URLgetClassResource(java.lang.ClassLoader classLoader, java.lang.String className)Get theClassresource URL under specifiedClass namestatic java.lang.ClassLoadergetDefaultClassLoader()Get the default the ClassLoader to use.static java.util.Set<java.lang.ClassLoader>getInheritableClassLoaders(java.lang.ClassLoader classLoader)Get all InheritableClassLoadersSet(includingClassLoaderargument)static intgetLoadedClassCount()Returns the number of classes that are currently loaded in the Java virtual machine.static java.util.Set<java.lang.Class<?>>getLoadedClasses(java.lang.ClassLoader classLoader)Get loaded classesSetunder specifiedClassLoader( not all inheritableClassLoaders)static java.net.URLgetResource(java.lang.ClassLoader classLoader, ClassLoaderUtils.ResourceType resourceType, java.lang.String resourceName)Get the resource URL under specified resource name and typestatic java.net.URLgetResource(java.lang.ClassLoader classLoader, java.lang.String resourceName)Get the resource URL under specified resource namestatic java.net.URLgetResource(java.lang.String resourceName)Get the resource URL under specified resource namestatic java.lang.StringgetResourceAsString(java.lang.ClassLoader classLoader, java.lang.String resourceName)Get the content of the specified resource as a String.static java.lang.StringgetResourceAsString(java.lang.String resourceName)Get the content of the specified resource as a String.static java.util.Set<java.net.URL>getResources(java.lang.ClassLoader classLoader, ClassLoaderUtils.ResourceType resourceType, java.lang.String resourceName)Get the resource URLs Set under specified resource name and typestatic java.util.Set<java.net.URL>getResources(java.lang.ClassLoader classLoader, java.lang.String resourceName)Get the resource URLs list under specified resource namestatic longgetTotalLoadedClassCount()Returns the total number of classes that have been loaded since the Java virtual machine has started execution.static longgetUnloadedClassCount()Returns the total number of classes unloaded since the Java virtual machine has started execution.static booleanisLoadedClass(java.lang.ClassLoader classLoader, java.lang.Class<?> type)Check specifiedClassis loaded on specified inheritableClassLoaderstatic booleanisLoadedClass(java.lang.ClassLoader classLoader, java.lang.String className)Check specifiedclass nameis loaded on specified inheritableClassLoaderstatic booleanisPresent(java.lang.String className)Test the specified class name is present in thedefault ClassLoaderstatic booleanisPresent(java.lang.String className, java.lang.ClassLoader classLoader)Test the specified class name is present in theClassLoaderstatic booleanisVerbose()Tests if the verbose output for the class loading system is enabled.static java.lang.Class<?>loadClass(java.lang.ClassLoader classLoader, java.lang.String className)Loaded specified class name underClassLoaderstatic java.lang.Class<?>loadClass(java.lang.ClassLoader classLoader, java.lang.String className, boolean cached)Loaded specified class name underClassLoaderstatic java.net.URLClassLoadernewURLClassLoader(java.lang.Iterable<java.net.URL> urls)Create a new instance ofURLClassLoaderstatic java.net.URLClassLoadernewURLClassLoader(java.lang.Iterable<java.net.URL> urls, java.lang.ClassLoader classLoader)Create a new instance ofURLClassLoaderstatic java.net.URLClassLoadernewURLClassLoader(java.net.URL[] urls)Create a new instance ofURLClassLoaderstatic java.net.URLClassLoadernewURLClassLoader(java.net.URL[] urls, boolean initializedLoaders)Create a new instance ofURLClassLoaderstatic java.net.URLClassLoadernewURLClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)Create a new instance ofURLClassLoaderstatic java.net.URLClassLoadernewURLClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent, boolean initializedLoaders)Create a new instance ofURLClassLoaderstatic booleanremoveClassPathURL(java.lang.ClassLoader classLoader, java.net.URL url)static java.lang.Class<?>resolveClass(java.lang.String className)Resolve theClassby the specified name in thedefault ClassLoaderstatic java.lang.Class<?>resolveClass(java.lang.String className, java.lang.ClassLoader classLoader)Resolve theClassby the specified name andClassLoaderstatic java.lang.Class<?>resolveClass(java.lang.String className, java.lang.ClassLoader classLoader, boolean cached)Resolve theClassby the specified name andClassLoaderstatic java.net.URLClassLoaderresolveURLClassLoader(java.lang.ClassLoader classLoader)Try to find the instance ofURLClassLoaderfrom the specifiedClassLoader, if it can't be found, it will try to find all theURLof class-paths from the specifiedClassLoader, and then new a instance ofURLClassLoaderupon those urls.static voidsetVerbose(boolean value)Enables or disables the verbose output for the class loading system.
-
-
-
Method Detail
-
getLoadedClassCount
public static int getLoadedClassCount()
Returns the number of classes that are currently loaded in the Java virtual machine.- Returns:
- the number of currently loaded classes.
-
getUnloadedClassCount
public static long getUnloadedClassCount()
Returns the total number of classes unloaded since the Java virtual machine has started execution.- Returns:
- the total number of unloaded classes.
-
getTotalLoadedClassCount
public static long getTotalLoadedClassCount()
Returns the total number of classes that have been loaded since the Java virtual machine has started execution.- Returns:
- the total number of classes loaded.
-
isVerbose
public static boolean isVerbose()
Tests if the verbose output for the class loading system is enabled.- Returns:
- true if the verbose output for the class loading system is enabled; false otherwise.
-
setVerbose
public static void setVerbose(boolean value)
Enables or disables the verbose output for the class loading system. The verbose output information and the output stream to which the verbose information is emitted are implementation dependent. Typically, a Java virtual machine implementation prints a message each time a class file is loaded.This method can be called by multiple threads concurrently. Each invocation of this method enables or disables the verbose output globally.
- Parameters:
value- true to enable the verbose output; false to disable.- Throws:
java.lang.SecurityException- if a security manager exists and the caller does not have ManagementPermission("control").
-
getDefaultClassLoader
@Nullable public static java.lang.ClassLoader getDefaultClassLoader()
Get the default the ClassLoader to use.- Returns:
- the ClassLoader (only
nullif even the system ClassLoader isn't accessible) - See Also:
Thread.getContextClassLoader(),Class.getClassLoader(),ClassLoader.getSystemClassLoader(),ReflectionUtils.getCallerClass()
-
getClassLoader
@Nullable public static java.lang.ClassLoader getClassLoader(@Nullable java.lang.Class<?> loadedClass)
Get the ClassLoader from the loaded class if present.- Parameters:
loadedClass- the optional class was loaded by someClassLoader- Returns:
- the ClassLoader (only
nullif even the system ClassLoader isn't accessible) - See Also:
getDefaultClassLoader()
-
getCallerClassLoader
@Nullable public static java.lang.ClassLoader getCallerClassLoader()
Return the ClassLoader from the caller class- Returns:
- the ClassLoader (only
nullif the caller class was absent - See Also:
ReflectionUtils.getCallerClass()
-
findLoadedClasses
public static java.util.Set<java.lang.Class<?>> findLoadedClasses(@Nullable java.lang.ClassLoader classLoader, java.lang.String... classNames)
Find LoadedClassunder specified inheritableClassLoaderand class names- Parameters:
classLoader-ClassLoaderclassNames- class names- Returns:
Classif loaded, ornull
-
findLoadedClasses
public static java.util.Set<java.lang.Class<?>> findLoadedClasses(@Nullable java.lang.ClassLoader classLoader, java.lang.Iterable<java.lang.String> classNames)
Find LoadedClassunder specified inheritableClassLoaderand class names- Parameters:
classLoader-ClassLoaderclassNames- class names set- Returns:
Classif loaded, ornull
-
isLoadedClass
public static boolean isLoadedClass(@Nullable java.lang.ClassLoader classLoader, java.lang.Class<?> type)
Check specifiedClassis loaded on specified inheritableClassLoader- Parameters:
classLoader-ClassLoadertype-Class- Returns:
- If Loaded , return
true, orfalse
-
isLoadedClass
public static boolean isLoadedClass(@Nullable java.lang.ClassLoader classLoader, java.lang.String className)
Check specifiedclass nameis loaded on specified inheritableClassLoader- Parameters:
classLoader-ClassLoaderclassName-class name- Returns:
- If Loaded , return
true, orfalse
-
findLoadedClass
public static java.lang.Class<?> findLoadedClass(@Nullable java.lang.ClassLoader classLoader, java.lang.String className)
Find LoadedClassunder specified inheritableClassLoader- Parameters:
classLoader-ClassLoaderclassName- class name- Returns:
Classif loaded , ornull
-
loadClass
@Nullable public static java.lang.Class<?> loadClass(@Nullable java.lang.ClassLoader classLoader, @Nullable java.lang.String className)
Loaded specified class name underClassLoader- Parameters:
classLoader-ClassLoaderclassName- the name ofClass- Returns:
Classif can be loaded
-
loadClass
public static java.lang.Class<?> loadClass(@Nullable java.lang.ClassLoader classLoader, @Nullable java.lang.String className, boolean cached)
Loaded specified class name underClassLoader- Parameters:
classLoader-ClassLoaderclassName- the name ofClasscached- the resolved class is required to be cached or not- Returns:
Classif can be loaded
-
doLoadClass
protected static java.lang.Class<?> doLoadClass(java.lang.ClassLoader classLoader, java.lang.String className)
-
getResources
public static java.util.Set<java.net.URL> getResources(@Nullable java.lang.ClassLoader classLoader, ClassLoaderUtils.ResourceType resourceType, java.lang.String resourceName) throws java.lang.NullPointerException, java.io.IOException
Get the resource URLs Set under specified resource name and type- Parameters:
classLoader- ClassLoaderresourceType-ClassLoaderUtils.ResourceTypeEnumresourceName- resource name ,e.g :
- Resource Name :
"/com/abc/def.log" - Class Name :
"java.lang.String"
- Resource Name :
- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnulljava.io.IOException
-
getResources
public static java.util.Set<java.net.URL> getResources(@Nullable java.lang.ClassLoader classLoader, java.lang.String resourceName) throws java.lang.NullPointerException, java.io.IOException
Get the resource URLs list under specified resource name- Parameters:
classLoader- ClassLoaderresourceName- resource name ,e.g :
- Resource Name :
"/com/abc/def.log" - Class Name :
"java.lang.String"
- Resource Name :
- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnulljava.io.IOException
-
getResource
public static java.net.URL getResource(java.lang.String resourceName) throws java.lang.NullPointerExceptionGet the resource URL under specified resource name- Parameters:
resourceName- resource name ,e.g :
- Resource Name :
"/com/abc/def.log" - Class Name :
"java.lang.String"
- Resource Name :
- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnull
-
getResource
public static java.net.URL getResource(@Nullable java.lang.ClassLoader classLoader, java.lang.String resourceName) throws java.lang.NullPointerException
Get the resource URL under specified resource name- Parameters:
classLoader- ClassLoaderresourceName- resource name ,e.g :
- Resource Name :
"/com/abc/def.log" - Class Name :
"java.lang.String"
- Resource Name :
- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnull
-
getResource
public static java.net.URL getResource(@Nullable java.lang.ClassLoader classLoader, ClassLoaderUtils.ResourceType resourceType, java.lang.String resourceName) throws java.lang.NullPointerException
Get the resource URL under specified resource name and type- Parameters:
classLoader- ClassLoaderresourceType-ClassLoaderUtils.ResourceTypeEnumresourceName- resource name ,e.g :
- Resource Name :
"/com/abc/def.log" - Class Name :
"java.lang.String"
- Resource Name :
- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnull
-
getResourceAsString
public static java.lang.String getResourceAsString(java.lang.String resourceName) throws java.lang.NullPointerException, java.io.IOExceptionGet the content of the specified resource as a String.- Parameters:
resourceName- the name of the resource to load- Returns:
- the content of the resource as a String
- Throws:
java.lang.NullPointerException- if the resourceName is nulljava.io.IOException- if an I/O error occurs while reading the resource
-
getResourceAsString
public static java.lang.String getResourceAsString(@Nullable java.lang.ClassLoader classLoader, java.lang.String resourceName) throws java.lang.NullPointerException, java.io.IOException
Get the content of the specified resource as a String.- Parameters:
classLoader- the ClassLoader to use for loading the resource, may benullresourceName- the name of the resource to load- Returns:
- the content of the resource as a String
- Throws:
java.lang.NullPointerException- if the resourceName is nulljava.io.IOException- if an I/O error occurs while reading the resource
-
getClassResource
public static java.net.URL getClassResource(@Nullable java.lang.ClassLoader classLoader, java.lang.String className)
Get theClassresource URL under specifiedClass name- Parameters:
classLoader- ClassLoaderclassName- class name- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnull
-
getClassResource
public static java.net.URL getClassResource(java.lang.Class<?> type)
Get theClassresource URL under specifiedClass- Parameters:
type-type- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnull
-
getClassResource
public static java.net.URL getClassResource(@Nullable java.lang.ClassLoader classLoader, java.lang.Class<?> type)
Get theClassresource URL under specifiedClass- Parameters:
classLoader- ClassLoadertype-type- Returns:
- the resource URL under specified resource name and type
- Throws:
java.lang.NullPointerException- If any argument isnull
-
getInheritableClassLoaders
@Nonnull public static java.util.Set<java.lang.ClassLoader> getInheritableClassLoaders(@Nullable java.lang.ClassLoader classLoader) throws java.lang.NullPointerException
Get all InheritableClassLoadersSet(includingClassLoaderargument)- Parameters:
classLoader-ClassLoader- Returns:
- Read-only
Set - Throws:
java.lang.NullPointerException- IfclassLoaderargument isnull
-
getAllLoadedClassesMap
@Nonnull public static java.util.Map<java.lang.ClassLoader,java.util.Set<java.lang.Class<?>>> getAllLoadedClassesMap(@Nullable java.lang.ClassLoader classLoader) throws java.lang.UnsupportedOperationException
Get all loaded classesMapunder specified inheritableClassLoader,ClassLoaderas key , its loaded classesSetas value.- Parameters:
classLoader-ClassLoader- Returns:
- Read-only Map
- Throws:
java.lang.UnsupportedOperationExceptionjava.lang.NullPointerException- IfclassLoaderargument isnull
-
getAllLoadedClasses
@Nonnull public static java.util.Set<java.lang.Class<?>> getAllLoadedClasses(@Nullable java.lang.ClassLoader classLoader) throws java.lang.UnsupportedOperationException
Get all loaded classesSetunder specified inheritableClassLoader- Parameters:
classLoader-ClassLoader- Returns:
- Read-only
Set - Throws:
java.lang.UnsupportedOperationException- If JVM does not supportjava.lang.NullPointerException- IfclassLoaderargument isnull
-
getLoadedClasses
@Nonnull public static java.util.Set<java.lang.Class<?>> getLoadedClasses(@Nullable java.lang.ClassLoader classLoader) throws java.lang.UnsupportedOperationException
Get loaded classesSetunder specifiedClassLoader( not all inheritableClassLoaders)- Parameters:
classLoader-ClassLoader- Returns:
- Read-only
Set - Throws:
java.lang.UnsupportedOperationException- If JVM does not supportjava.lang.NullPointerException- IfclassLoaderargument isnull- See Also:
getAllLoadedClasses(ClassLoader)
-
findLoadedClassesInClassPath
public static java.util.Set<java.lang.Class<?>> findLoadedClassesInClassPath(@Nullable java.lang.ClassLoader classLoader) throws java.lang.UnsupportedOperationException
Find loaded classesSetin class path- Parameters:
classLoader-ClassLoader- Returns:
- Read-only
Set - Throws:
java.lang.UnsupportedOperationException- If JVM does not support
-
findLoadedClassesInClassPaths
public static java.util.Set<java.lang.Class<?>> findLoadedClassesInClassPaths(@Nullable java.lang.ClassLoader classLoader, java.util.Set<java.lang.String> classPaths) throws java.lang.UnsupportedOperationException
Find loaded classesSetin class pathsSet- Parameters:
classLoader-ClassLoaderclassPaths- the class paths for theSetofJarFileor classes directory- Returns:
- Read-only
Set - Throws:
java.lang.UnsupportedOperationException- If JVM does not support- See Also:
findLoadedClass(ClassLoader, String)
-
findLoadedClassesInClassPath
public static java.util.Set<java.lang.Class<?>> findLoadedClassesInClassPath(@Nullable java.lang.ClassLoader classLoader, java.lang.String classPath) throws java.lang.UnsupportedOperationException
Find loaded classesSetin class path- Parameters:
classLoader-ClassLoaderclassPath- the class path for oneJarFileor classes directory- Returns:
- Read-only
Set - Throws:
java.lang.UnsupportedOperationException- If JVM does not support- See Also:
findLoadedClass(ClassLoader, String)
-
isPresent
public static boolean isPresent(@Nullable java.lang.String className)
Test the specified class name is present in thedefault ClassLoader- Parameters:
className- the name ofClass- Returns:
- If found, return
true
-
isPresent
public static boolean isPresent(@Nullable java.lang.String className, @Nullable java.lang.ClassLoader classLoader)
Test the specified class name is present in theClassLoader- Parameters:
className- the name ofClassclassLoader-ClassLoader- Returns:
- If found, return
true
-
resolveClass
public static java.lang.Class<?> resolveClass(@Nullable java.lang.String className)
Resolve theClassby the specified name in thedefault ClassLoader- Parameters:
className- the name ofClass- Returns:
- If can't be resolved , return
null
-
resolveClass
public static java.lang.Class<?> resolveClass(@Nullable java.lang.String className, @Nullable java.lang.ClassLoader classLoader)
Resolve theClassby the specified name andClassLoader- Parameters:
className- the name ofClassclassLoader-ClassLoader- Returns:
- If can't be resolved , return
null
-
resolveClass
public static java.lang.Class<?> resolveClass(@Nullable java.lang.String className, @Nullable java.lang.ClassLoader classLoader, boolean cached)
Resolve theClassby the specified name andClassLoader- Parameters:
className- the name ofClassclassLoader-ClassLoadercached- the resolved class is required to be cached or not- Returns:
- If can't be resolved , return
null
-
findAllClassPathURLs
public static java.util.Set<java.net.URL> findAllClassPathURLs(@Nullable java.lang.ClassLoader classLoader)
-
removeClassPathURL
public static boolean removeClassPathURL(@Nullable java.lang.ClassLoader classLoader, java.net.URL url)
-
findURLClassLoader
@Nullable public static java.net.URLClassLoader findURLClassLoader(@Nullable java.lang.ClassLoader classLoader)
-
newURLClassLoader
@Nonnull public static java.net.URLClassLoader newURLClassLoader(@Nonnull java.lang.Iterable<java.net.URL> urls)
Create a new instance ofURLClassLoader- Parameters:
urls- the urls- Returns:
- non-null
URLClassLoader - Throws:
java.lang.IllegalArgumentException- if theurlsis null or contains null element
-
newURLClassLoader
@Nonnull public static java.net.URLClassLoader newURLClassLoader(@Nonnull java.lang.Iterable<java.net.URL> urls, @Nullable java.lang.ClassLoader classLoader)
Create a new instance ofURLClassLoader- Parameters:
urls- the urls- Returns:
- non-null
URLClassLoader - Throws:
java.lang.IllegalArgumentException- if theurlsis null or contains null element
-
newURLClassLoader
@Nonnull public static java.net.URLClassLoader newURLClassLoader(@Nonnull java.net.URL[] urls)
Create a new instance ofURLClassLoader- Parameters:
urls- the urls- Returns:
- non-null
URLClassLoader - Throws:
java.lang.IllegalArgumentException- if theurlsis null or contains null element
-
newURLClassLoader
@Nonnull public static java.net.URLClassLoader newURLClassLoader(@Nonnull java.net.URL[] urls, boolean initializedLoaders)
Create a new instance ofURLClassLoader- Parameters:
urls- the urlsinitializedLoaders- the loaders of URLClassPath will be initialized or not- Returns:
- non-null
URLClassLoader - Throws:
java.lang.IllegalArgumentException- if theurlsis null or contains null element
-
newURLClassLoader
@Nonnull public static java.net.URLClassLoader newURLClassLoader(@Nonnull java.net.URL[] urls, @Nullable java.lang.ClassLoader parent) throws java.lang.IllegalArgumentException
Create a new instance ofURLClassLoader- Parameters:
urls- the urlsparent- theClassLoaderas parent- Returns:
- non-null
URLClassLoader - Throws:
java.lang.IllegalArgumentException- if theurlsis null or contains null element
-
newURLClassLoader
@Nonnull public static java.net.URLClassLoader newURLClassLoader(@Nonnull java.net.URL[] urls, @Nullable java.lang.ClassLoader parent, boolean initializedLoaders) throws java.lang.IllegalArgumentException
Create a new instance ofURLClassLoader- Parameters:
urls- the urlsparent- theClassLoaderas parentinitializedLoaders- the loaders of URLClassPath will be initialized or not- Returns:
- non-null
URLClassLoader - Throws:
java.lang.IllegalArgumentException- if theurlsis null or contains null element
-
resolveURLClassLoader
@Nonnull public static java.net.URLClassLoader resolveURLClassLoader(@Nullable java.lang.ClassLoader classLoader)
Try to find the instance ofURLClassLoaderfrom the specifiedClassLoader, if it can't be found, it will try to find all theURLof class-paths from the specifiedClassLoader, and then new a instance ofURLClassLoaderupon those urls.- Parameters:
classLoader-ClassLoader- Returns:
- non-null
URLClassLoader
-
-