org.apache.tapestry
Interface IResourceResolver

All Superinterfaces:
ognl.ClassResolver
All Known Implementing Classes:
DefaultResourceResolver

public interface IResourceResolver
extends ognl.ClassResolver

An object which is used to resolve classes and class-path resources. This is needed because, in an application server, different class loaders will be loading the Tapestry framework and the specific Tapestry application.

The class loader for the framework needs to be able to see resources in the application, but the application's class loader is a descendent of the framework's class loader. To resolve this, we need a 'hook', an instance that provides access to the application's class loader.

To more easily support OGNL, this interface now extends ClassResolver.

Version:
$Id: IResourceResolver.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Method Summary
 Class findClass(String name)
          Forwarded, to the the method Class.forName(String, boolean, ClassLoader), using the application's class loader.
 ClassLoader getClassLoader()
          Returns a ClassLoader that can see all the classes the resolver can access.
 URL getResource(String name)
          Forwarded, unchanged, to the class loader.
 
Methods inherited from interface ognl.ClassResolver
classForName
 

Method Detail

getResource

URL getResource(String name)
Forwarded, unchanged, to the class loader. Returns null if the resource is not found.


findClass

Class findClass(String name)
Forwarded, to the the method Class.forName(String, boolean, ClassLoader), using the application's class loader. Throws an ApplicationRuntimeException on any error.


getClassLoader

ClassLoader getClassLoader()
Returns a ClassLoader that can see all the classes the resolver can access.

Since:
3.0