org.apache.tools.ant.types .Resource org.apache.tools.ant.types.resources .JavaResource JavaResource public class JavaResource extends Resource (Code) A Resource representation of something loadable via a Java classloader.
since: Ant 1.7
Constructor Summary public JavaResource () Default constructor.public JavaResource (String name, Path path) Construct a new JavaResource using the specified name and
classpath.
JavaResource public JavaResource()(Code) Default constructor.
JavaResource public JavaResource(String name, Path path)(Code) Construct a new JavaResource using the specified name and
classpath.
Parameters: name - the resource name.Parameters: path - the classpath.
compareTo public int compareTo(Object another)(Code) Compare this JavaResource to another Resource.
Parameters: another - the other Resource against which to compare. a negative integer, zero, or a positive integer as thisJavaResource is less than, equal to, or greater than thespecified Resource.
createClasspath public Path createClasspath()(Code) Add a classpath to use when looking up a resource.
The classpath to be configured
getClasspath public Path getClasspath()(Code) get the classpath used by this LoadProperties
.
The classpath
getInputStream public InputStream getInputStream() throws IOException (Code) Return an InputStream for reading the contents of this Resource.
an InputStream object.throws: IOException - if an error occurs.
isExists public boolean isExists()(Code) Learn whether this file exists.
true if this resource exists.
setClasspath public void setClasspath(Path classpath)(Code) Set the classpath to use when looking up a resource.
Parameters: classpath - to add to any existing classpath
setClasspathRef public void setClasspathRef(Reference r)(Code) Set the classpath to use when looking up a resource,
given as reference to a <path> defined elsewhere
Parameters: r - The reference value
setLoaderRef public void setLoaderRef(Reference r)(Code) 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.
Parameters: r - the reference to locate the loader.
setRefid public void setRefid(Reference r)(Code) Overrides the super version.
Parameters: r - the Reference to set.