Package org.infinispan.commons.util
Class OsgiClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- org.infinispan.commons.util.OsgiClassLoader
-
public class OsgiClassLoader extends java.lang.ClassLoader
- Author:
- Brett Meyer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Class<?>
findClass(java.lang.String name)
Load the class and break on first found match.protected java.net.URL
findResource(java.lang.String name)
Load the resource and break on first found match.protected java.util.Enumeration<java.net.URL>
findResources(java.lang.String name)
Load the resources and return an Enumeration Note: Since they're Enumerations, do not cache these results!static OsgiClassLoader
getInstance()
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Method Detail
-
getInstance
public static OsgiClassLoader getInstance()
-
findClass
protected java.lang.Class<?> findClass(java.lang.String name) throws java.lang.ClassNotFoundException
Load the class and break on first found match. TODO: Should this throw a different exception or warn if multiple classes were found? Naming collisions can and do happen in OSGi...- Overrides:
findClass
in classjava.lang.ClassLoader
- Throws:
java.lang.ClassNotFoundException
-
findResource
protected java.net.URL findResource(java.lang.String name)
Load the resource and break on first found match. TODO: Should this throw a different exception or warn if multiple resources were found? Naming collisions can and do happen in OSGi...- Overrides:
findResource
in classjava.lang.ClassLoader
-
findResources
protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
Load the resources and return an Enumeration Note: Since they're Enumerations, do not cache these results!- Overrides:
findResources
in classjava.lang.ClassLoader
-
-