org.nakedobjects.metamodel.commons.resource
Class ResourceStreamSourceCurrentClassClassPath

java.lang.Object
  extended by org.nakedobjects.metamodel.commons.resource.ResourceStreamSourceAbstract
      extended by org.nakedobjects.metamodel.commons.resource.ResourceStreamSourceCurrentClassClassPath
All Implemented Interfaces:
ResourceStreamSource

public class ResourceStreamSourceCurrentClassClassPath
extends ResourceStreamSourceAbstract

Load from this class' ClassLoader.

This is useful if (a) the contextClassLoader is not available and (b) the contextClassLoader does not load from this classes ClassLoader (for example when running under Ant while running unit tests as part of an automated build).


Constructor Summary
ResourceStreamSourceCurrentClassClassPath()
           
 
Method Summary
protected  java.io.InputStream doReadResource(java.lang.String resourcePath)
          Mandatory hook method; subclasses can return either null or throw an exception if the resource could not be found.
 java.lang.String getName()
           
 
Methods inherited from class org.nakedobjects.metamodel.commons.resource.ResourceStreamSourceAbstract
readResource, writeResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceStreamSourceCurrentClassClassPath

public ResourceStreamSourceCurrentClassClassPath()
Method Detail

doReadResource

protected java.io.InputStream doReadResource(java.lang.String resourcePath)
                                      throws java.io.IOException
Description copied from class: ResourceStreamSourceAbstract
Mandatory hook method; subclasses can return either null or throw an exception if the resource could not be found.

Specified by:
doReadResource in class ResourceStreamSourceAbstract
Throws:
java.io.IOException

getName

public java.lang.String getName()


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.