NetKernel APIs


org.ten60.netkernel.layer1.util
Class SuperStackClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byorg.ten60.netkernel.layer1.util.SuperStackClassLoader

public class SuperStackClassLoader
extends ClassLoader

A Classloader that will load classes from a module but then accend the superstack of a request to find classes in calling contexts. It also contains a cache which improves performance with some of the liberal ways that classloaders are used in scripting engines. This includes caching of not found exceptions. This classloader adds an overhead as compared to the regular module classloader however it gives classloading which is strictly according to the same model as used in resource resolution- this however is rarely needed.


Constructor Summary
SuperStackClassLoader(URRequest aRequest)
          Creates a new instance of ScriptClassLoader
 
Method Summary
 void cleanup()
           
 boolean equals(Object aOther)
          classloaders are equal if they operate on equal superstacks
 Class findClass(String aName)
           
 URL getResource(String aName)
          This implementation isn't strictly correct- better to use the NK addressspace to sourcre resources.
 Class loadClass(String aName)
           
 Class loadClass(String aName, boolean aResolve)
           
 String toString()
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuperStackClassLoader

public SuperStackClassLoader(URRequest aRequest)
Creates a new instance of ScriptClassLoader

Method Detail

cleanup

public void cleanup()

findClass

public Class findClass(String aName)
                throws ClassNotFoundException
Throws:
ClassNotFoundException

loadClass

public Class loadClass(String aName,
                       boolean aResolve)
                throws ClassNotFoundException
Throws:
ClassNotFoundException

loadClass

public Class loadClass(String aName)
                throws ClassNotFoundException
Throws:
ClassNotFoundException

getResource

public URL getResource(String aName)
This implementation isn't strictly correct- better to use the NK addressspace to sourcre resources. This method will only load resources from the immediate context and won't look in the superstack.

Parameters:
aName -
Returns:

equals

public boolean equals(Object aOther)
classloaders are equal if they operate on equal superstacks


toString

public String toString()

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.