org.nakedobjects.metamodel.commons.resource
Class ResourceStreamSourceContextLoaderClassPath

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

public class ResourceStreamSourceContextLoaderClassPath
extends ResourceStreamSourceAbstract

Loads the properties from the ContextClassLoader.

If this class is on the system class path, then the class loader obtained from this.getClassLoader() won't be able to load resources from the application class path.


Constructor Summary
ResourceStreamSourceContextLoaderClassPath()
           
 
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

ResourceStreamSourceContextLoaderClassPath

public ResourceStreamSourceContextLoaderClassPath()
Method Detail

doReadResource

protected java.io.InputStream doReadResource(java.lang.String resourcePath)
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

getName

public java.lang.String getName()


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