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 |
---|---|
Enumeration<PluginEntry> |
entries()
Return all the resources inside a plugin
|
com.google.common.base.Optional<PluginEntry> |
getEntry(String resourcePath)
Return the plugin resource associated to a path
|
InputStream |
getInputStream(PluginEntry entry)
Return the InputStream of the resource entry
|
Manifest |
getManifest()
Return the plugin meta-data manifest
|
Map<Class<? extends Annotation>,Iterable<PluginContentScanner.ExtensionMetaData>> |
scan(String pluginName,
Iterable<Class<? extends Annotation>> annotations)
Scans the plugin for declared public annotated classes
|
static final PluginContentScanner EMPTY
Manifest getManifest() throws IOException
IOException
- if an I/O problem occurred whilst accessing the ManifestMap<Class<? extends Annotation>,Iterable<PluginContentScanner.ExtensionMetaData>> scan(String pluginName, Iterable<Class<? extends 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(String resourcePath) throws IOException
resourcePath
- full path of the resource inside the plugin packageIOException
- if there was a problem retrieving the resourceInputStream getInputStream(PluginEntry entry) throws IOException
entry
- resource entry inside the plugin packageIOException
- if there was an I/O problem accessing the resourceEnumeration<PluginEntry> entries()