org.apache.tapestry5.ioc.internal.util
Class ClasspathResource

java.lang.Object
  extended by org.apache.tapestry5.ioc.internal.util.LockSupport
      extended by org.apache.tapestry5.ioc.internal.util.AbstractResource
          extended by org.apache.tapestry5.ioc.internal.util.ClasspathResource
All Implemented Interfaces:
Resource

public final class ClasspathResource
extends AbstractResource

Implementation of Resource for files on the classpath (as defined by a ClassLoader).


Constructor Summary
ClasspathResource(ClassLoader classLoader, String path)
           
ClasspathResource(String path)
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
protected  Resource newResource(String path)
          Factory method provided by subclasses.
 String toString()
           
 URL toURL()
          Returns the URL for the resource, or null if it does not exist.
 
Methods inherited from class org.apache.tapestry5.ioc.internal.util.AbstractResource
exists, forFile, forLocale, getFile, getFolder, getPath, openStream, withExtension
 
Methods inherited from class org.apache.tapestry5.ioc.internal.util.LockSupport
acquireReadLock, downgradeWriteLockToReadLock, releaseReadLock, releaseWriteLock, takeWriteLock, upgradeReadLockToWriteLock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClasspathResource

public ClasspathResource(String path)

ClasspathResource

public ClasspathResource(ClassLoader classLoader,
                         String path)
Method Detail

newResource

protected Resource newResource(String path)
Description copied from class: AbstractResource
Factory method provided by subclasses.

Specified by:
newResource in class AbstractResource

toURL

public URL toURL()
Description copied from interface: Resource
Returns the URL for the resource, or null if it does not exist. This value is lazily computed; starting in 5.3.4, subclasses may cache the result.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2012 The Apache Software Foundation.