org.apache.commons.jci.compilers
Class JavacClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.apache.commons.jci.compilers.JavacClassLoader

public final class JavacClassLoader
extends java.net.URLClassLoader

This classloader injects the FileIn/OutputStream wrappers into javac. Access to the store/reader is done via ThreadLocals. It also tries to find the javac class on the system and expands the classpath accordingly.

Author:
tcurdt

Constructor Summary
JavacClassLoader(java.lang.ClassLoader pParent)
           
 
Method Summary
protected  java.lang.Class findClass(java.lang.String name)
           
protected  java.lang.Class loadClass(java.lang.String classname, boolean resolve)
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, 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

JavacClassLoader

public JavacClassLoader(java.lang.ClassLoader pParent)
Method Detail

findClass

protected java.lang.Class findClass(java.lang.String name)
                             throws java.lang.ClassNotFoundException
Overrides:
findClass in class java.net.URLClassLoader
Throws:
java.lang.ClassNotFoundException

loadClass

protected java.lang.Class loadClass(java.lang.String classname,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
Overrides:
loadClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.