|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
org.objectweb.dsrg.sofa.SOFAClassLoader
public class SOFAClassLoader
SOFA2 custom classloader aware of the CodeBundle concept.
Use this classloader to load classes stored in CodeBundle in sofa repository.
There is only one instance of this classloader in JVM accessible with static method.
Method Summary | |
---|---|
CodeBundle |
getCodeBundle(java.lang.Class<?> cl)
Returns CodeBundle the specified class originates from. |
static SOFAClassLoader |
getSOFAClassLoader()
Returns systemwide instance of SOFAClassLoader. |
java.lang.Class<?> |
loadClass(byte[] b,
java.lang.String name)
Loads class stored in byte array in classfile format. |
java.lang.Class<?> |
loadClass(CodeBundle bundle,
java.lang.String className)
Loads class stored in CodeBundle and its dependancies. |
java.lang.Class<?> |
loadClass(java.lang.String className)
Loads class of given name. |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SOFAClassLoader getSOFAClassLoader()
public CodeBundle getCodeBundle(java.lang.Class<?> cl)
cl
- Class you want to know originating CodeBundle.
public java.lang.Class<?> loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
Primarily class is searched in standard locations. See SystemClassLoader.
If called from code loaded from CodeBundle then this CodeBundle is searched for given class.
loadClass
in class java.lang.ClassLoader
className
- Name of the class you want to load.
java.lang.ClassNotFoundException
public java.lang.Class<?> loadClass(CodeBundle bundle, java.lang.String className) throws java.lang.ClassNotFoundException
bundle
- CodeBundle to search for requested class. If null
class is searched on the classpath.className
- Name of the requested class.
java.lang.ClassNotFoundException
public java.lang.Class<?> loadClass(byte[] b, java.lang.String name)
b
- Byte array containing data in standard classfile format.name
- Expected name of the class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |