1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-22 01:48:50 +00:00

refactor: 优化方法名称

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-10-17 00:48:57 +08:00
parent 7ee5fc9b40
commit a596310693

View File

@ -61,7 +61,7 @@ public class CommandParse {
return new CommandParse(method.getParameterTypes(), method.getParameterAnnotations(), method.getReturnType().equals(boolean.class)); return new CommandParse(method.getParameterTypes(), method.getParameterAnnotations(), method.getReturnType().equals(boolean.class));
} }
public static void registerParse(Class clazz, Parse parse) { public static void register(Class clazz, Parse parse) {
allparses.put(clazz, parse); allparses.put(clazz, parse);
} }
@ -241,9 +241,6 @@ public class CommandParse {
public StringParse() { public StringParse() {
allparses.put(String.class, this); allparses.put(String.class, this);
if (attrs.containsKey("option")) {
options = Arrays.asList(attrs.get("option").split(","));
}
} }
@Override @Override
@ -256,5 +253,13 @@ public class CommandParse {
} }
return arg; return arg;
} }
@Override
public Parse<String> parseAnnotation(Annotation[] annotations) {
if (attrs.containsKey("option")) {
options = Arrays.asList(attrs.get("option").split(","));
}
return super.parseAnnotation(annotations);
}
} }
} }