mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Add a "shell" pseudo-command to nomulus tool
Add the "shell" command which lets you run multiple other command in a single session, sparing you the initialization costs for all but the first of them. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=188712815
This commit is contained in:
parent
64986442bc
commit
f1c29633fb
6 changed files with 256 additions and 35 deletions
|
@ -90,8 +90,8 @@ public class RegistryToolTest {
|
|||
/**
|
||||
* Gets the set of all non-abstract classes implementing the {@link Command} interface (abstract
|
||||
* class and interface subtypes of Command aren't expected to have cli commands). Note that this
|
||||
* also filters out HelpCommand, which has special handling in {@link RegistryCli} and isn't in
|
||||
* the command map.
|
||||
* also filters out HelpCommand and ShellCommand, which have special handling in {@link
|
||||
* RegistryCli} and aren't in the command map.
|
||||
*
|
||||
* @throws IOException if reading the classpath resources fails.
|
||||
*/
|
||||
|
@ -105,7 +105,8 @@ public class RegistryToolTest {
|
|||
if (Command.class.isAssignableFrom(clazz)
|
||||
&& !Modifier.isAbstract(clazz.getModifiers())
|
||||
&& !Modifier.isInterface(clazz.getModifiers())
|
||||
&& !clazz.equals(HelpCommand.class)) {
|
||||
&& !clazz.equals(HelpCommand.class)
|
||||
&& !clazz.equals(ShellCommand.class)) {
|
||||
builder.add((Class<? extends Command>) clazz);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue