Modifier and Type | Class and Description |
---|---|
public static class |
Modifier and Type | Field and Description |
---|---|
private Path | |
private Reference | |
private boolean |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public Path | Returns: The classpath to be configuredAdd a classpath to use when looking up a resource. |
protected synchronized void | dieOnCircularReference(Stack<Object>
the stack of references to check. stk, Project the project to use to dereference the references. p)Overrides org. |
protected AbstractClasspathResource. | Returns: ClassLoaderWithFlagcombines 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. |
public Path | |
public InputStream | Returns: an InputStream object.Overrides org. |
public Reference | |
protected AbstractClasspathResource | getRef()
Overrides org. |
public boolean | Returns: true if this resource exists.Overrides org. |
protected abstract InputStream | Returns: an open input stream for the resourcethe classloader to use. Will be null if the system classloader is used cl)open the input stream from a specific classloader |
public void | setClasspath(Path
to add to any existing classpath classpath)Set the classpath to use when looking up a resource. |
public void | setClasspathRef(Reference
The reference value r)Set the classpath to use when looking up a resource, given as reference to a <path> defined elsewhere |
public void | |
public void | |
public void | setRefid(Reference
the Reference to set. r)Overrides org. |
classpath | back to summary |
---|---|
private Path classpath |
loader | back to summary |
---|---|
private Reference loader |
parentFirst | back to summary |
---|---|
private boolean parentFirst |
AbstractClasspathResource | back to summary |
---|---|
public AbstractClasspathResource() |
createClasspath | back to summary |
---|---|
public Path createClasspath() Add a classpath to use when looking up a resource.
|
dieOnCircularReference | back to summary |
---|---|
protected synchronized void dieOnCircularReference(Stack<Object> stk, Project p) Overrides org. Doc from org. Check to see whether any DataType we hold references to is included in the Stack (which holds all DataType instances that directly or indirectly reference this instance, including this instance itself). If one is included, throw a BuildException created by This implementation is appropriate only for a DataType that cannot hold other DataTypes as children. The general contract of this method is that it shouldn't do
anything if |
getClassLoader | back to summary |
---|---|
protected AbstractClasspathResource. 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.
|
getClasspath | back to summary |
---|---|
public Path getClasspath() get the classpath used by this
|
getInputStream | back to summary |
---|---|
public InputStream getInputStream() throws IOException Overrides org. Return an InputStream for reading the contents of this Resource.
|
getLoader | back to summary |
---|---|
public Reference getLoader() Get the loader.
|
getRef | back to summary |
---|---|
protected AbstractClasspathResource getRef() Overrides org. Doc from org. Perform the check for circular references and return the referenced Resource.
|
isExists | back to summary |
---|---|
public boolean isExists() Overrides org. Learn whether this resource exists. This implementation opens the input stream as the test.
|
openInputStream | back to summary |
---|---|
protected abstract InputStream openInputStream(ClassLoader cl) throws IOException open the input stream from a specific classloader
|
setClasspath | back to summary |
---|---|
public void setClasspath(Path classpath) Set the classpath to use when looking up a resource.
|
setClasspathRef | back to summary |
---|---|
public void setClasspathRef(Reference r) Set the classpath to use when looking up a resource, given as reference to a <path> defined elsewhere
|
setLoaderRef | back to summary |
---|---|
public void setLoaderRef(Reference r) Use the reference to locate the loader. If the loader is not found, taskdef will use the specified classpath and register it with the specified name. This allow multiple taskdef/typedef to use the same class loader, so they can be used together. It eliminate the need to put them in the CLASSPATH.
|
setParentFirst | back to summary |
---|---|
public void setParentFirst(boolean b) Whether to consult the parent classloader first. Only relevant if a classpath has been specified.
|
setRefid | back to summary |
---|---|
public void setRefid(Reference r) Overrides org. Overrides the super version.
|
Modifier and Type | Field and Description |
---|---|
private final boolean | |
private final ClassLoader |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public void | |
public ClassLoader | |
public boolean |
cleanup | back to summary |
---|---|
private final boolean cleanup |
loader | back to summary |
---|---|
private final ClassLoader loader |
ClassLoaderWithFlag | back to summary |
---|---|
pack-priv ClassLoaderWithFlag(ClassLoader l, boolean needsCleanup) |
cleanup | back to summary |
---|---|
public void cleanup() |
getLoader | back to summary |
---|---|
public ClassLoader getLoader() |
needsCleanup | back to summary |
---|---|
public boolean needsCleanup() |