org.apache.tapestry.resource
Class ClasspathResourceLocation
java.lang.Object
org.apache.tapestry.resource.AbstractResourceLocation
org.apache.tapestry.resource.ClasspathResourceLocation
- All Implemented Interfaces:
- IResourceLocation
public class ClasspathResourceLocation
- extends AbstractResourceLocation
Implementation of IResourceLocation
for resources found within the classpath.
- Since:
- 3.0
- Version:
- $Id: ClasspathResourceLocation.java 243791 2004-02-19 17:38:13Z hlship $
- Author:
- Howard Lewis Ship
ClasspathResourceLocation
public ClasspathResourceLocation(IResourceResolver resolver,
String path)
ClasspathResourceLocation
public ClasspathResourceLocation(IResourceResolver resolver,
String path,
Locale locale)
getLocalization
public IResourceLocation getLocalization(Locale locale)
- Locates the localization of the
resource using
LocalizedResourceFinder
- Parameters:
locale
- to localize for, or null for no localization.
- Returns:
- a localized version of this resource, of null if the resource
itself does not exist.
getResourceURL
public URL getResourceURL()
- Invokes
IResourceResolver.getResource(String)
- Returns:
- the URL for the resource if it exists, or null if it does not
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
buildNewResourceLocation
protected IResourceLocation buildNewResourceLocation(String path)
- Specified by:
buildNewResourceLocation
in class AbstractResourceLocation