Class JavaAgent.agent.NetworkClassLoader
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaAgent.agent.NetworkClassLoader

java.lang.Object
   |
   +----java.lang.ClassLoader
           |
           +----JavaAgent.agent.NetworkClassLoader

public class NetworkClassLoader
extends ClassLoader
Class which loads other classes over the net from a given URL. Modified from WWWClassLoader, see copyright notice below. ----------------------------------------------------------------

Variable Index

 o ctx

Constructor Index

 o NetworkClassLoader(URL, Agent)
Creates a new NetworkClassLoader for loading classes from the given URL.

Method Index

 o loadClass(String)
Load a class from this class loader.
 o loadClass(String, boolean)
Load and resolve a class.
 o localPackage(String)
Check if a package is local.

Variables

 o ctx
  public URL ctx

Constructors

 o NetworkClassLoader
  public NetworkClassLoader(URL url,
                            Agent p)
Creates a new NetworkClassLoader for loading classes from the given URL.
Parameters:
location - The URL for the code.

Methods

 o localPackage
  public static synchronized boolean localPackage(String pkg)
Check if a package is local. The package name is seperated by /'s. I will be loading things from identical packages (package Agent), so the idea of a localPackage may not be very useful.
 o loadClass
  public Class loadClass(String name)
Load a class from this class loader.
 o loadClass
  protected Class loadClass(String name,
                            boolean resolve) throws ClassNotFoundException
Load and resolve a class. If the class is not in the AgentClassLoader buffer then first try to get it from the runtime system, if that fails then try to find it. If it can't be found, return null.
Overrides:
loadClass in class ClassLoader

All Packages  Class Hierarchy  This Package  Previous  Next  Index