org.apache.tools.ant.types.resources
public abstract class AbstractClasspathResource extends Resource
Since: Ant 1.8.0
Nested Class Summary | |
---|---|
static class | AbstractClasspathResource.ClassLoaderWithFlag |
Method Summary | |
---|---|
Path | createClasspath()
Add a classpath to use when looking up a resource. |
protected void | dieOnCircularReference(Stack stk, Project p) |
protected AbstractClasspathResource.ClassLoaderWithFlag | getClassLoader()
combines the various ways that could specify a ClassLoader and
potentially creates one that needs to be cleaned up when it is
no longer needed so that classes can get garbage collected. |
Path | getClasspath()
get the classpath used by this LoadProperties . |
InputStream | getInputStream()
Return an InputStream for reading the contents of this Resource. |
Reference | getLoader()
Get the loader. |
boolean | isExists()
Learn whether this resource exists. |
protected abstract InputStream | openInputStream(ClassLoader cl)
open the inpout stream from a specific classloader |
void | setClasspath(Path classpath)
Set the classpath to use when looking up a resource. |
void | setClasspathRef(Reference r)
Set the classpath to use when looking up a resource,
given as reference to a <path> defined elsewhere |
void | setLoaderRef(Reference r)
Use the reference to locate the loader. |
void | setParentFirst(boolean b)
Whether to consult the parent classloader first.
|
void | setRefid(Reference r)
Overrides the super version. |
Returns: The classpath to be configured
LoadProperties
.Returns: The classpath
Returns: an InputStream object.
Throws: IOException if an error occurs.
Returns: the loader.
Returns: true if this resource exists.
Parameters: cl the classloader to use. Will be null if the system classloader is used
Returns: an open input stream for the resource
Throws: IOException if an error occurs.
Parameters: classpath to add to any existing classpath
Parameters: r The reference value
Parameters: r the reference to locate the loader.
Only relevant if a classpath has been specified.
Since: Ant 1.8.0
Parameters: r the Reference to set.