public class ProjectClassLoader extends URLClassLoader
Constructor and Description |
---|
ProjectClassLoader(org.apache.tools.ant.Project project,
org.apache.tools.ant.types.Path classpath)
Creates a new
ProjectClassLoader instance taking a project and a class path. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the class loader.
|
protected void |
finalize()
Removes temporary resources.
|
URL |
findResource(String name)
Finds a resource with a given name.
|
Enumeration<URL> |
findResources(String name)
Gets all resources matching a given name.
|
static Set<String> |
getDefaultModletExcludes()
Gets a set of modlet names excluded by default.
|
static Set<String> |
getDefaultProviderExcludes()
Gets a set of provider names excluded by default.
|
static Set<String> |
getDefaultSchemaExcludes()
Gets a set of schema public identifiers excluded by default.
|
static Set<String> |
getDefaultServiceExcludes()
Gets a set of service class names excluded by default.
|
Modlets |
getExcludedModlets()
Gets a set of modlets excluded during resource loading.
|
Set<String> |
getExcludedProviders()
Gets a set of providers excluded during resource loading.
|
Schemas |
getExcludedSchemas()
Gets a set of schemas excluded during resource loading.
|
Services |
getExcludedServices()
Gets a set of services excluded during resource loading.
|
Set<String> |
getModletExcludes()
Gets a set of modlet names to exclude.
|
Set<String> |
getModletResourceLocations()
Gets a set of modlet resource locations to filter.
|
org.apache.tools.ant.Project |
getProject()
Gets the project of the instance.
|
Set<String> |
getProviderExcludes()
Gets a set of provider names to exclude.
|
Set<String> |
getProviderResourceLocations()
Gets a set of provider resource locations to filter.
|
Set<String> |
getSchemaExcludes()
Gets a set of schema public identifiers to exclude.
|
Set<String> |
getServiceExcludes()
Gets a set of service class names to exclude.
|
addURL, definePackage, findClass, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ProjectClassLoader(org.apache.tools.ant.Project project, org.apache.tools.ant.types.Path classpath) throws MalformedURLException
ProjectClassLoader
instance taking a project and a class path.project
- The project to which this class loader is to belong.classpath
- The class path to use for loading.MalformedURLException
- if classpath
contains unsupported elements.public final org.apache.tools.ant.Project getProject()
public URL findResource(String name)
findResource
in class URLClassLoader
name
- The name of the resource to search.URL
object for reading the resource or null
, if no resource matching name
is
found.public Enumeration<URL> findResources(String name) throws IOException
findResources
in class URLClassLoader
name
- The name of the resources to get.URL
objects of found resources.IOException
- if getting resources fails.public final Set<String> getModletResourceLocations()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
modlet resource locations property.
public final Set<String> getProviderResourceLocations()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
provider resource locations property.
public final Set<String> getModletExcludes()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
modlet excludes property.
public static Set<String> getDefaultModletExcludes() throws IOException
IOException
- if reading configuration resources fails.public final Modlets getExcludedModlets()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
excluded modlets property.
public final Set<String> getProviderExcludes()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
provider excludes property.
public static Set<String> getDefaultProviderExcludes() throws IOException
IOException
- if reading configuration resources fails.public final Set<String> getExcludedProviders()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
excluded providers property.
public final Set<String> getServiceExcludes()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
service excludes property.
public static Set<String> getDefaultServiceExcludes() throws IOException
IOException
- if reading configuration resources fails.public final Services getExcludedServices()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
excluded services property.
public final Set<String> getSchemaExcludes()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
schema excludes property.
public static Set<String> getDefaultSchemaExcludes() throws IOException
IOException
- if reading configuration resources fails.public final Schemas getExcludedSchemas()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
excluded schemas property.
@IgnoreJRERequirement public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class URLClassLoader
IOException
- if closing the class loader fails.Copyright © 2005–2014 The JOMC Project. All rights reserved.