@Override
public int executeCommand(CommandContext context) {
if (context.getArgumentCount() > 0) {
for (int i = 0, n = context.getArgumentCount(); i < n; i++) {
String unitName = context.getArgument(i);
Loggable unit = cpu.getLoggable(unitName);
if (unit == null) {
context.out.println(" " + unitName + ": NOT FOUND");
} else {
String id = unit.getID();
String name = unit.getName();
if (id == name) {
context.out.println(unit.getName() + ": " + unit.getClass().getName());
} else {
context.out.println(unit.getID() + " (" + unit.getName() + "): "
+ unit.getClass().getName());
}
String info = unit.info();
if (info != null) {
context.out.println(info);
}
}
}