public static interface DynamicOptions.ModulesClassNamesProvider extends DynamicOptions.ClassNameProvider
Do this by binding to the name of the command you are going to bind to and providing an Iterable of Module names to instantiate and add to the Injector used to instantiate the DynamicBean in the other classLoader. For example:
bind(com.google.gerrit.server.DynamicOptions.DynamicBean.class) .annotatedWith(Exports.named( "com.google.gerrit.plugins.otherplugin.command")) .to(MyOptionsModulesClassNamesProvider.class); static class MyOptionsModulesClassNamesProvider implements DynamicOptions.ClassNameProvider { @Override public String getClassName() { return "com.googlesource.gerrit.plugins.myplugin.CommandOptions"; } @Override public IterablegetModulesClassNames()() { return "com.googlesource.gerrit.plugins.myplugin.MyOptionsModule"; } }
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<java.lang.String> |
getModulesClassNames() |
getClassName