public class SystemResolver extends Object implements CommandResolver
Modifier and Type | Field and Description |
---|---|
private static HashMap<String,Class<? extends BaseCommand>> |
commands
.
|
private static HashMap<String,String> |
descriptions
.
|
static SystemResolver |
INSTANCE
.
|
Modifier | Constructor and Description |
---|---|
private |
SystemResolver() |
Modifier and Type | Method and Description |
---|---|
private <C extends BaseCommand> |
createCommand(Class<C> commandClass) |
Iterable<Map.Entry<String,String>> |
getDescriptions() |
Command<?> |
resolveCommand(String name)
Attempt to obtain a command.
|
public static final SystemResolver INSTANCE
private static final HashMap<String,Class<? extends BaseCommand>> commands
private static final HashMap<String,String> descriptions
private SystemResolver()
public Iterable<Map.Entry<String,String>> getDescriptions()
getDescriptions
in interface CommandResolver
public Command<?> resolveCommand(String name) throws CommandException, NullPointerException
CommandResolver
resolveCommand
in interface CommandResolver
name
- the command nameCommandException
- if an error occured preventing the command creationNullPointerException
- if the name argument is nullprivate <C extends BaseCommand> CommandResolution createCommand(Class<C> commandClass) throws CommandException
CommandException
Copyright © 2015 eXo Platform SAS. All Rights Reserved.