org.apache.hivemind.util
Class ClasspathResource
java.lang.Object
org.apache.hivemind.util.AbstractResource
org.apache.hivemind.util.ClasspathResource
- All Implemented Interfaces:
- Resource
public class ClasspathResource
- extends AbstractResource
Implementation of Resource
for resources found within the classpath.
- Author:
- Howard Lewis Ship
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ClasspathResource
public ClasspathResource(ClassResolver resolver,
java.lang.String path)
ClasspathResource
public ClasspathResource(ClassResolver resolver,
java.lang.String path,
java.util.Locale locale)
getLocalization
public Resource getLocalization(java.util.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 java.net.URL getResourceURL()
- Invokes
ClassResolver.getResource(String)
with the path.
- Returns:
- the URL for the resource if it exists, or null if it does not
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
newResource
protected Resource newResource(java.lang.String path)
- Specified by:
newResource
in class AbstractResource
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.