public CommandModelImpl(Class<?> commandType) { Service service = commandType.getAnnotation(Service.class); commandName = service != null ? service.name() : null; commandClass = commandType; i18n = commandType.getAnnotation(I18n.class); execOn = commandType.getAnnotation(ExecuteOn.class); localStrings = new LocalStringManagerImpl(commandType); params = init(commandType, i18n, localStrings); Class currentClazz = commandType; boolean found = false; while (currentClazz != null) { if (currentClazz.isAnnotationPresent(UnknownOptionsAreOperands.class)) found = true; currentClazz = currentClazz.getSuperclass(); } dashOk = found; }
public CommandModelImpl(Class<?> commandType) { Service service = commandType.getAnnotation(Service.class); commandName = service != null ? service.name() : null; commandClass = commandType; i18n = commandType.getAnnotation(I18n.class); execOn = commandType.getAnnotation(ExecuteOn.class); localStrings = new LocalStringManagerImpl(commandType); managedJob = AnnotationUtil.presentTransitive(ManagedJob.class, commandType); params = init(commandType, i18n, localStrings); Class currentClazz = commandType; boolean found = false; while (currentClazz != null) { if (currentClazz.isAnnotationPresent(UnknownOptionsAreOperands.class)) { found = true; } currentClazz = currentClazz.getSuperclass(); } dashOk = found; }
public CommandModelImpl(Class<?> commandType) { Service service = commandType.getAnnotation(Service.class); commandName = service != null ? service.name() : null; commandClass = commandType; i18n = commandType.getAnnotation(I18n.class); execOn = commandType.getAnnotation(ExecuteOn.class); localStrings = new LocalStringManagerImpl(commandType); managedJob = AnnotationUtil.presentTransitive(ManagedJob.class, commandType); params = init(commandType, i18n, localStrings); Class currentClazz = commandType; boolean found = false; while (currentClazz != null) { if (currentClazz.isAnnotationPresent(UnknownOptionsAreOperands.class)) { found = true; } currentClazz = currentClazz.getSuperclass(); } dashOk = found; }
for (Map.Entry<String, ParamModel> e : CommandModelImpl.init(extraType, i18n, localStrings).entrySet()) { if (!params.containsKey(e.getKey())) params.put(e.getKey(), e.getValue());
for (Map.Entry<String, ParamModel> e : CommandModelImpl.init(extraType, i18n, localStrings).entrySet()) { if (!params.containsKey(e.getKey())) params.put(e.getKey(), e.getValue());
for (Map.Entry<String, ParamModel> e : CommandModelImpl.init(extraType, i18n, localStrings).entrySet()) { if (!params.containsKey(e.getKey())) params.put(e.getKey(), e.getValue());