org.apache.tapestry.resource
Class ClasspathResourceLocation

java.lang.Object
  extended by org.apache.tapestry.resource.AbstractResourceLocation
      extended by 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

Constructor Summary
ClasspathResourceLocation(IResourceResolver resolver, String path)
           
ClasspathResourceLocation(IResourceResolver resolver, String path, Locale locale)
           
 
Method Summary
protected  IResourceLocation buildNewResourceLocation(String path)
           
 IResourceLocation getLocalization(Locale locale)
          Locates the localization of the resource using LocalizedResourceFinder
 URL getResourceURL()
          Invokes IResourceResolver.getResource(String)
 int hashCode()
           
 String toString()
           
 
Methods inherited from class org.apache.tapestry.resource.AbstractResourceLocation
equals, getLocale, getName, getPath, getRelativeLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClasspathResourceLocation

public ClasspathResourceLocation(IResourceResolver resolver,
                                 String path)

ClasspathResourceLocation

public ClasspathResourceLocation(IResourceResolver resolver,
                                 String path,
                                 Locale locale)
Method Detail

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