org.nakedobjects.metamodel.commons.resource
Class ResourceStreamSourceCurrentClassClassPath
java.lang.Object
org.nakedobjects.metamodel.commons.resource.ResourceStreamSourceAbstract
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).
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceStreamSourceCurrentClassClassPath
public ResourceStreamSourceCurrentClassClassPath()
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.