Class ClasspathResourceManager
java.lang.Object
org.codehaus.groovy.tools.groovydoc.ClasspathResourceManager
- All Implemented Interfaces:
ResourceManager
Loads documentation resources from the classpath.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a resource manager backed by this class's class loader.ClasspathResourceManager(ClassLoader classLoader) Creates a resource manager backed by the supplied class loader. -
Method Summary
Modifier and TypeMethodDescriptiongetInputStream(String resourceName) Opens the named resource as an input stream.Returns a reader for the named resource.
-
Constructor Details
-
ClasspathResourceManager
public ClasspathResourceManager()Creates a resource manager backed by this class's class loader. -
ClasspathResourceManager
Creates a resource manager backed by the supplied class loader.- Parameters:
classLoader- the class loader to use for resource lookups
-
-
Method Details
-
getInputStream
Opens the named resource as an input stream.- Parameters:
resourceName- the classpath resource to load- Returns:
- the resource stream, or
nullif the resource does not exist
-
getReader
Returns a reader for the named resource.- Specified by:
getReaderin interfaceResourceManager- Parameters:
resourceName- the resource to open- Returns:
- a reader for the resource
- Throws:
IOException- if the resource cannot be opened
-