Add SWCommand.ClassMapper.local
Dieser Commit ist enthalten in:
Ursprung
314120a01f
Commit
c1e7fdbb1d
@ -88,7 +88,11 @@ public abstract class SWCommand {
|
||||
}
|
||||
});
|
||||
addMapper(ClassMapper.class, method, i -> i == 0, false, TypeMapper.class, (anno, typeMapper) -> {
|
||||
if (anno.local()) {
|
||||
localTypeMapper.put(anno.value().getTypeName(), typeMapper);
|
||||
} else {
|
||||
SWCommandUtils.addMapper(anno.value().getTypeName(), typeMapper);
|
||||
}
|
||||
});
|
||||
add(Register.class, method, i -> i > 0, true, null, (anno, parameters) -> {
|
||||
if (!anno.help()) {
|
||||
@ -215,5 +219,7 @@ public abstract class SWCommand {
|
||||
@Target({ElementType.METHOD})
|
||||
protected @interface ClassMapper {
|
||||
Class<?> value();
|
||||
|
||||
boolean local() default false;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren