public Class<?> loadClass(String name) throws ClassNotFoundException { Class<?> ret = null; // The _loadedExternalExtensionFunctions will be empty when the // SecurityManager is not set and the FSP is turned off if (_loadedExternalExtensionFunctions != null) { ret = _loadedExternalExtensionFunctions.get(name); } if (ret == null) { ret = super.loadClass(name); } return ret; }
/** * Access to final protected superclass member from outer class. */ Class defineClass(finalbyte[] b) { return defineClass(null, b, 0, b.length); } }
protected Class loadClass(String class_name, boolean resolve)throws ClassNotFoundException { Classcl=null;
// First try: lookup hash table. cl = (Class) classes.get(class_name); if (cl == null) { // Second try: Load system class using system class loader. You better don't mess around with them.for (int i = 0; i < ignored_packages.length; i++) { if (class_name.startsWith(ignored_packages[i])) { cl = deferTo.loadClass(class_name); break; } }
if (cl == null) { JavaClassclazz=null;
// Third try: Special request?if (class_name.indexOf("$$BCEL$$") >= 0) { clazz = createClass(class_name); } else {// Fourth try: Load classes via repository clazz = repository.loadClass(class_name); if (clazz != null) { clazz = modifyClass(clazz); } else { thrownewClassNotFoundException(class_name); } }
if (clazz != null) { byte[] bytes = clazz.getBytes(); cl = defineClass(class_name, bytes, 0, bytes.length); } else {// Fourth try: Use default class loader cl = Class.forName(class_name); } }