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 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(ClassLoader pParent)
           
 
Method Summary
protected  Class findClass(String name)
           
protected  Class loadClass(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(ClassLoader pParent)
Method Detail

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Overrides:
findClass in class URLClassLoader
Throws:
ClassNotFoundException

loadClass

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


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