com.croftsoft.core.lang.classloader
Class CustomClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by com.croftsoft.core.lang.classloader.CustomClassLoader
Direct Known Subclasses:
NetClassLoader

public abstract class CustomClassLoader
extends ClassLoader

Assumes that Java 1.1 is being used and classes are cached as the default behavior as part of the defineClass() method.

This should be upgraded when the switch is made from Java 1.1 to Java 1.2.

References Scott Oaks, Java Security, O'Reilly, 1998.

Version:
1998-05-25
Author:
David Wallace Croft

Constructor Summary
CustomClassLoader()
           
 
Method Summary
 Class loadClass(String name, boolean resolve)
          Returns the Class of the given name.
protected abstract  byte[] loadClassData(String name)
          Implement to load the raw bytecode from an external source.
static String parsePackageName(String className)
          Parses the package name out of a full class 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
 

Constructor Detail

CustomClassLoader

public CustomClassLoader()
Method Detail

parsePackageName

public static String parsePackageName(String className)
Parses the package name out of a full class name. Returns the empty string ("") if the class is not in a package.


loadClass

public Class loadClass(String name,
                       boolean resolve)
Returns the Class of the given name.

Calls loadClassData() if the class was not previously loaded and is not a system class.

Overrides:
loadClass in class ClassLoader

loadClassData

protected abstract byte[] loadClassData(String name)
Implement to load the raw bytecode from an external source.

Returns:
May return null on failure.

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)