Dieser Commit ist enthalten in:
Ursprung
0e993d8f3e
Commit
acb23705d8
@ -45,7 +45,7 @@ class SubCommand {
|
||||
GuardChecker guardChecker;
|
||||
Class<?> varArgType = null;
|
||||
private boolean help;
|
||||
boolean noTabComplete = false;
|
||||
boolean noTabComplete;
|
||||
|
||||
SubCommand(SWCommand swCommand, Method method, String[] subCommand, Map<String, TypeMapper<?>> localTypeMapper, Map<String, GuardChecker> localGuardChecker, boolean help, String[] description, boolean noTabComplete) {
|
||||
this.swCommand = swCommand;
|
||||
@ -71,7 +71,8 @@ class SubCommand {
|
||||
}
|
||||
|
||||
SWCommand.Mapper mapper = parameter.getAnnotation(SWCommand.Mapper.class);
|
||||
if (clazz.isEnum() && mapper == null && !MAPPER_FUNCTIONS.containsKey(clazz.getTypeName()) && !localTypeMapper.containsKey(clazz.getTypeName())) {
|
||||
SWCommand.ClassMapper classMapper = parameter.getAnnotation(SWCommand.ClassMapper.class);
|
||||
if (clazz.isEnum() && mapper == null && classMapper == null && !MAPPER_FUNCTIONS.containsKey(clazz.getTypeName()) && !localTypeMapper.containsKey(clazz.getTypeName())) {
|
||||
Class<Enum<?>> enumClass = (Class<Enum<?>>) clazz;
|
||||
List<String> tabCompletes = new ArrayList<>();
|
||||
for (Enum<?> enumConstant : enumClass.getEnumConstants()) {
|
||||
@ -82,7 +83,9 @@ class SubCommand {
|
||||
}
|
||||
|
||||
String name = clazz.getTypeName();
|
||||
if (mapper != null) {
|
||||
if (classMapper != null) {
|
||||
name = classMapper.value().getTypeName();
|
||||
} else if (mapper != null) {
|
||||
name = mapper.value();
|
||||
} else {
|
||||
SWCommand.StaticValue staticValue = parameter.getAnnotation(SWCommand.StaticValue.class);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren