com.sun.tools.xjc.api.util
Class APTClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by com.sun.tools.xjc.api.util.APTClassLoader

public final class APTClassLoader
extends URLClassLoader

ClassLoader that loads APT and specified classes both into the same classloader, so that they can reference each other.

Since:
2.0 beta

Constructor Summary
APTClassLoader(ClassLoader parent, String[] packagePrefixes)
           
 
Method Summary
protected  Class findClass(String name)
           
 Class loadClass(String className)
           
 
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

APTClassLoader

public APTClassLoader(@Nullable
                      ClassLoader parent,
                      String[] packagePrefixes)
               throws ToolsJarNotFoundException
Parameters:
packagePrefixes - The package prefixes that are forced to resolve within this class loader.
parent - The parent class loader to delegate to. Null to indicate bootstrap classloader.
Throws:
ToolsJarNotFoundException
Method Detail

loadClass

public Class loadClass(String className)
                throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

findClass

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