public final class PluginLoader extends Object implements PluginClassLoader
ClassLoader
of a particular compiler instance.
com.sun.source.tree
and com.sun.source.util
packages are public APIs whose
implementation is packaged with javac rather than in the Java runtime jar. Code that needs to
work with these must be loaded using the same ClassLoader
as the instance of javac with
which it will be working.
Modifier and Type | Method and Description |
---|---|
static ClassLoader |
getPluginClassLoader(ClassLoaderCache classLoaderCache,
JavaCompiler.CompilationTask compiler)
Returns a class loader that can be used to load classes from the compiler plugin jar.
|
<T> Class<? extends T> |
loadClass(String name,
Class<T> superclass) |
static PluginClassLoaderFactory |
newFactory(ClassLoaderCache cache) |
static PluginLoader |
newInstance(ClassLoaderCache classLoaderCache,
JavaCompiler.CompilationTask compiler) |
public static ClassLoader getPluginClassLoader(ClassLoaderCache classLoaderCache, JavaCompiler.CompilationTask compiler)
public static PluginLoader newInstance(ClassLoaderCache classLoaderCache, JavaCompiler.CompilationTask compiler)
public static PluginClassLoaderFactory newFactory(ClassLoaderCache cache)
public <T> Class<? extends T> loadClass(String name, Class<T> superclass)
loadClass
in interface PluginClassLoader