org.apache.tapestry5.ioc.internal.util
public final class: ClasspathResource [javadoc |
source]
java.lang.Object
org.apache.tapestry5.ioc.internal.util.AbstractResource
org.apache.tapestry5.ioc.internal.util.ClasspathResource
All Implemented Interfaces:
Resource
Implementation of
Resource for files on the classpath (as defined by a
ClassLoader ).
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.tapestry5.ioc.internal.util.ClasspathResource Detail: |
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (obj.getClass() != getClass()) return false;
ClasspathResource other = (ClasspathResource) obj;
return other.classLoader == classLoader && other.getPath().equals(getPath());
}
|
public int hashCode() {
return 227 ^ getPath().hashCode();
}
|
protected Resource newResource(String path) {
return new ClasspathResource(classLoader, path);
}
|
public String toString() {
return "classpath:" + getPath();
}
|
public synchronized URL toURL() {
if (!urlResolved)
{
url = classLoader.getResource(getPath());
urlResolved = true;
}
return url;
}
|