public class PluginFirstClassLoader extends AntWithFindResourceClassLoader implements Closeable
Constructor and Description |
---|
PluginFirstClassLoader() |
Modifier and Type | Method and Description |
---|---|
void |
addPathFiles(Collection<File> paths) |
void |
close() |
protected Enumeration |
findResources(String name)
Returns an enumeration of URLs representing all the resources with the
given name by searching the class loader's classpath.
|
protected Enumeration |
findResources(String arg0,
boolean arg1)
Returns an enumeration of URLs representing all the resources with the
given name by searching the class loader's classpath.
|
URL |
getResource(String arg0)
Finds the resource with the given name.
|
InputStream |
getResourceAsStream(String name)
Returns a stream to read the requested resource name.
|
List<URL> |
getURLs() |
findResource
addJavaLibraries, addLoaderPackageRoot, addPathComponent, addPathElement, addPathFile, addSystemPackageRoot, buildFinished, buildStarted, cleanup, defineClassFromData, definePackage, definePackage, findClass, forceLoadClass, forceLoadSystemClass, getClasspath, getConfiguredParent, getNamedResources, 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, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public void addPathFiles(Collection<File> paths) throws IOException
addPathFiles
in class AntWithFindResourceClassLoader
IOException
public List<URL> getURLs()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class AntWithFindResourceClassLoader
IOException
protected Enumeration findResources(String arg0, boolean arg1) throws IOException
AntClassLoader
findResources
in class AntClassLoader
arg0
- The resource name to search for.
Must not be null
.arg1
- whether ClassLoader.this.parent
has been searched - will be true if the method is (indirectly)
called from ClassLoader.getResourcesIOException
- if I/O errors occurs (can't happen)protected Enumeration findResources(String name) throws IOException
AntClassLoader
findResources
in class AntClassLoader
name
- The resource name to search for.
Must not be null
.IOException
- if I/O errors occurs (can't happen)public URL getResource(String arg0)
AntClassLoader
getResource
in class AntClassLoader
arg0
- The name of the resource for which a stream is required.
Must not be null
.null
if the
resource could not be found or the caller doesn't have
adequate privileges to get the resource.public InputStream getResourceAsStream(String name)
AntClassLoader
getResourceAsStream
in class AntClassLoader
name
- The name of the resource for which a stream is required.
Must not be null
.null
if the
resource cannot be found on the loader's classpath.Copyright © 2004–2021. All rights reserved.