org.apache.velocity.test.misc
Class ExceptionGeneratingResourceLoader

java.lang.Object
  extended by org.apache.velocity.runtime.resource.loader.ResourceLoader
      extended by org.apache.velocity.test.misc.ExceptionGeneratingResourceLoader

public class ExceptionGeneratingResourceLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader

Resource Loader that always throws an exception. Used to test that RuntimeExceptions are passed through.

Version:
$Id: ExceptionGeneratingResourceLoader.java 463298 2006-10-12 16:10:32Z henning $
Author:
Will Glass-Husain

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, log, modificationCheckInterval, rsvc
 
Constructor Summary
ExceptionGeneratingResourceLoader()
           
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
           
 InputStream getResourceStream(String source)
           
 void init(ExtendedProperties configuration)
           
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
           
 
Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
commonInit, getClassName, getModificationCheckInterval, isCachingOn, resourceExists, setCachingOn, setModificationCheckInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionGeneratingResourceLoader

public ExceptionGeneratingResourceLoader()
Method Detail

init

public void init(ExtendedProperties configuration)
Specified by:
init in class org.apache.velocity.runtime.resource.loader.ResourceLoader

getResourceStream

public InputStream getResourceStream(String source)
                              throws org.apache.velocity.exception.ResourceNotFoundException
Specified by:
getResourceStream in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Throws:
org.apache.velocity.exception.ResourceNotFoundException

isSourceModified

public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
Specified by:
isSourceModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader

getLastModified

public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Specified by:
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader


Copyright © 2000-2010 The Apache Software Foundation. All Rights Reserved.