public class JavaResource extends AbstractClasspathResource implements URLProvider
AbstractClasspathResource.ClassLoaderWithFlag
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE
description, location, project
Constructor and Description |
---|
JavaResource()
Default constructor.
|
JavaResource(java.lang.String name,
Path path)
Construct a new JavaResource using the specified name and
classpath.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Resource another)
Compare this JavaResource to another Resource.
|
java.net.URL |
getURL()
Get the URL represented by this Resource.
|
protected java.io.InputStream |
openInputStream(java.lang.ClassLoader cl)
open the input stream from a specific classloader
|
createClasspath, dieOnCircularReference, getClassLoader, getClasspath, getInputStream, getLoader, isExists, setClasspath, setClasspathRef, setLoaderRef, setParentFirst, setRefid
as, clone, equals, getLastModified, getMagicNumber, getName, getOutputStream, getSize, hashCode, isDirectory, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setSize, size, toLongString, toString
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public JavaResource()
public JavaResource(java.lang.String name, Path path)
name
- the resource name.path
- the classpath.protected java.io.InputStream openInputStream(java.lang.ClassLoader cl) throws java.io.IOException
openInputStream
in class AbstractClasspathResource
cl
- the classloader to use. Will be null if the system
classloader is usedjava.io.IOException
- if an error occurs.public java.net.URL getURL()
getURL
in interface URLProvider
public int compareTo(Resource another)
compareTo
in interface java.lang.Comparable<Resource>
compareTo
in class Resource
another
- the other Resource against which to compare.