All Packages  This Package  Class Hierarchy  Class Search  Index

Class kh.farm.SimpleClassLoader
java.lang.Object
   |
   +----java.lang.ClassLoader
           |
           +----kh.farm.SimpleClassLoader

  Summary

public class  SimpleClassLoader
     extends java.lang.ClassLoader
{
          // Fields 2
     public static SimpleClassLoader ourLoader;
     public static final String urlPrefix;

          // Methods 11
     public static SimpleClassLoader createLoader(String, String);
     public static Object getLocalResource(String, String);
     public static InputStream getLocalResourceAsStream(String, String);

     public synchronized void applyDefinitions(Vector);
     public Class findClass(String);
     public URL getResource(String);
     public InputStream getResourceAsStream(String);
     protected Class loadClass(String, boolean) throws ClassNotFoundException;
     public Class loadFromFile(String);
     public void setDefinition(String, byte[]);
     public void setLocalResourceSource(String, InputStreamProducer);
}


  Cross Reference

Returned By:
SimpleClassLoader.createLoader()





  Fields

· ourLoader

Summary  |  Top
   public static SimpleClassLoader ourLoader


· urlPrefix

Summary  |  Top
   public static final String urlPrefix


  Methods

· applyDefinitions

Summary  |  Top

   public synchronized void applyDefinitions(Vector classList) 

May want to add some support for reporting classes replicated across different JAR files.



· createLoader

Summary  |  Top
   public static SimpleClassLoader createLoader(String cookie, 
                                                String dir) 

Returns an InputStream on the resource



· findClass

Summary  |  Top
   public Class findClass(String name) 

Public version of findLoadedClass() to expose it across



· getLocalResource

Summary  |  Top
   public static Object getLocalResource(String cookie, 
                                         String name) 


· getLocalResourceAsStream

Summary  |  Top
   public static InputStream getLocalResourceAsStream(String cookie, 
                                                      String name) 


· getResource

Summary  |  Top
   public URL getResource(String name) 
Overrides:
getResource in class ClassLoader


· getResourceAsStream

Summary  |  Top
   public InputStream getResourceAsStream(String name) 
Overrides:
getResourceAsStream in class ClassLoader


· loadClass

Summary  |  Top
   protected Class loadClass(String name, 
                             boolean resolve)  throws ClassNotFoundException

This is the main method for ClassLoaders, that is being redefined

Overrides:
loadClass in class ClassLoader


· loadFromFile

Summary  |  Top
   public Class loadFromFile(String fileName) 

Helper function; load a class from a file



· setDefinition

Summary  |  Top
   public void setDefinition(String name, 
                             byte[] buf) 

Set some bytecodes as a definition for a class. Do not actually define the class until later



· setLocalResourceSource

Summary  |  Top
   public void setLocalResourceSource(String name, 
                                      InputStreamProducer isp) 

Assign an InputStream as the source for a given property name This value comes first after the system resources



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7