org.apache.tools.ant.loader
Class AntClassLoader2
- BuildListener, EventListener, SubBuildListener
public class AntClassLoader2
An implementation of the AntClassLoader suitable for use on post JDK 1.1
platforms
protected void | addPathFile(File pathComponent) - Add a file to the path.
|
protected Class | defineClassFromData(File container, byte[] classData, String className) - Define a class given its bytes
|
protected void | definePackage(File container, String className) - Define the package information associated with a class.
|
protected void | definePackage(File container, String packageName, Manifest manifest) - Define the package information when the class comes from a
jar with a manifest
|
addJavaLibraries , addLoaderPackageRoot , addPathElement , addPathFile , addSystemPackageRoot , buildFinished , buildStarted , cleanup , defineClassFromData , findClass , findResources , forceLoadClass , forceLoadSystemClass , getClasspath , getResource , getResourceAsStream , getResourceURL , initializeClass , isInPath , loadClass , log , messageLogged , resetThreadContextLoader , setClassPath , setIsolated , setParent , setParentFirst , setProject , setThreadContextLoader , subBuildFinished , subBuildStarted , targetFinished , targetStarted , taskFinished , taskStarted |
AntClassLoader2
public AntClassLoader2()
Constructor
addPathFile
protected void addPathFile(File pathComponent)
throws IOException
Add a file to the path. This classloader reads the manifest, if
available, and adds any additional class path jars specified in the
manifest.
- addPathFile in interface AntClassLoader
pathComponent
- the file which is to be added to the path for
this class loader
defineClassFromData
protected Class defineClassFromData(File container,
byte[] classData,
String className)
throws IOException
Define a class given its bytes
- defineClassFromData in interface AntClassLoader
container
- the container from which the class data has been read
may be a directory or a jar/zip file.classData
- the bytecode data for the classclassName
- the name of the class
- the Class instance created from the given data
definePackage
protected void definePackage(File container,
String className)
throws IOException
Define the package information associated with a class.
container
- the file containing the class definition.className
- the class name of for which the package information
is to be determined.
definePackage
protected void definePackage(File container,
String packageName,
Manifest manifest)
Define the package information when the class comes from a
jar with a manifest
container
- the jar file containing the manifestpackageName
- the name of the package being defined.manifest
- the jar's manifest
Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.