protected List<String> getParamNamesForCommand(final BaseCmd cmd) { final List<String> paramNames = new ArrayList<String>(); // The expected param names are all the specific for the current command class ... for (final Field field : cmd.getParamFields()) { final Parameter parameterAnnotation = field.getAnnotation(Parameter.class); paramNames.add(parameterAnnotation.name()); } // ... plus the default ones paramNames.addAll(defaultParamNames); return paramNames; } }
final Map<Object, AccessType> entitiesToAccess = new HashMap<Object, AccessType>(); final List<Field> cmdFields = cmd.getParamFields();