public final class ClasspathResource extends AbstractResource
Resource
for files on the classpath (as defined by a ClassLoader
).Constructor and Description |
---|
ClasspathResource(java.lang.ClassLoader classLoader,
java.lang.String path) |
ClasspathResource(java.lang.String path) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
protected Resource |
newResource(java.lang.String path)
Factory method provided by subclasses.
|
java.lang.String |
toString() |
java.net.URL |
toURL()
Returns the URL for the resource, or null if it does not exist.
|
exists, forFile, forLocale, getFile, getFolder, getPath, isVirtual, openStream, validateURL, withExtension
acquireReadLock, downgradeWriteLockToReadLock, releaseReadLock, releaseWriteLock, takeWriteLock, upgradeReadLockToWriteLock
public ClasspathResource(java.lang.String path)
public ClasspathResource(java.lang.ClassLoader classLoader, java.lang.String path)
protected Resource newResource(java.lang.String path)
AbstractResource
newResource
in class AbstractResource
public java.net.URL toURL()
Resource
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.