Automatically register plugin bindings
If a plugin has no modules declared in the manifest, automatically
generate the modules for the plugin based on the class files that
appear in the plugin and the @Export annotations that appear on these
concrete classes.
For any non-abstract command that extends SshCommand (or really the
internal MINA SSHD Command interface that Gerrit uses), plugins may
declare the command with @Export("name") to bind the implementation
as that SSH command, e.g.:
@Export("print-hello")
class Hello extend SshCommand {
Likewise HTTP servlets can also be bound to URLs, but this only works
for standard servlet mappings like "/foo" or "/foo/*". Regex style
bindings must use the Guice ServletModule declared in the manifest:
@Export("/print-hello")
class Hello extends HttpServlet {
Change-Id: Iae4cffcd62d7d2911d3f2705e226fbe21434be68
10 files changed