public class AntWithFindResourceClassLoader extends AntClassLoader implements Closeable
AntClassLoader
doesn't implement findResource(String)
in any meaningful way, which breaks fast lookup. Implement it properly.Constructor and Description |
---|
AntWithFindResourceClassLoader(ClassLoader parent,
boolean parentFirst) |
Modifier and Type | Method and Description |
---|---|
void |
addPathFiles(Collection<File> paths) |
void |
close() |
Class<?> |
findLoadedClass2(String name)
Public version of
ClassLoader.findLoadedClass(String) |
URL |
findResource(String name) |
Object |
getClassLoadingLock(String className)
Public version of
ClassLoader.getClassLoadingLock(String) |
addJavaLibraries, addLoaderPackageRoot, addPathComponent, addPathElement, addPathFile, addSystemPackageRoot, buildFinished, buildStarted, cleanup, defineClassFromData, definePackage, definePackage, findClass, findResources, findResources, forceLoadClass, forceLoadSystemClass, getClasspath, getConfiguredParent, getNamedResources, getResource, getResourceAsStream, getResourceURL, getUrl, initializeClass, isInPath, loadClass, log, messageLogged, newAntClassLoader, resetThreadContextLoader, setClassPath, setIsolated, setParent, setParentFirst, setProject, setThreadContextLoader, subBuildFinished, subBuildStarted, targetFinished, targetStarted, taskFinished, taskStarted, toString
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public AntWithFindResourceClassLoader(ClassLoader parent, boolean parentFirst)
public void addPathFiles(Collection<File> paths) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public URL findResource(String name)
findResource
in class ClassLoader
public Class<?> findLoadedClass2(String name)
ClassLoader.findLoadedClass(String)
public Object getClassLoadingLock(String className)
ClassLoader.getClassLoadingLock(String)
getClassLoadingLock
in class ClassLoader
Copyright © 2004–2021. All rights reserved.