public interface PluginContentScanner
Modifier and Type | Interface and Description |
---|---|
static class |
PluginContentScanner.ExtensionMetaData
Plugin class extension meta-data
Class name and annotation value of the class
provided by a plugin to extend an existing
extension point in Gerrit.
|
Modifier and Type | Field and Description |
---|---|
static PluginContentScanner |
EMPTY
Scanner without resources.
|
Modifier and Type | Method and Description |
---|---|
java.util.Enumeration<PluginEntry> |
entries()
Return all the resources inside a plugin
|
com.google.common.base.Optional<PluginEntry> |
getEntry(java.lang.String resourcePath)
Return the plugin resource associated to a path
|
java.io.InputStream |
getInputStream(PluginEntry entry)
Return the InputStream of the resource entry
|
java.util.jar.Manifest |
getManifest()
Return the plugin meta-data manifest
|
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.Iterable<PluginContentScanner.ExtensionMetaData>> |
scan(java.lang.String pluginName,
java.lang.Iterable<java.lang.Class<? extends java.lang.annotation.Annotation>> annotations)
Scans the plugin for declared public annotated classes
|
static final PluginContentScanner EMPTY
java.util.jar.Manifest getManifest() throws java.io.IOException
java.io.IOException
- if an I/O problem occurred whilst accessing the Manifestjava.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.Iterable<PluginContentScanner.ExtensionMetaData>> scan(java.lang.String pluginName, java.lang.Iterable<java.lang.Class<? extends java.lang.annotation.Annotation>> annotations) throws InvalidPluginException
pluginName
- the plugin nameannotations
- annotations declared by the plugin classesInvalidPluginException
- if the plugin is not valid or corruptedcom.google.common.base.Optional<PluginEntry> getEntry(java.lang.String resourcePath) throws java.io.IOException
resourcePath
- full path of the resource inside the plugin packagejava.io.IOException
- if there was a problem retrieving the resourcejava.io.InputStream getInputStream(PluginEntry entry) throws java.io.IOException
entry
- resource entry inside the plugin packagejava.io.IOException
- if there was an I/O problem accessing the resourcejava.util.Enumeration<PluginEntry> entries()