public void execute(ConsoleReader consoleReader, ServerConnection connection, CommandArgs commandArgs) throws DeploymentException {
if (!(commandArgs instanceof ListModulesCommandArgs)) {
throw new DeploymentSyntaxException("CommandArgs has the type [" + commandArgs.getClass() + "]; expected [" + ListModulesCommandArgs.class + "]");
}
ListModulesCommandArgs listModulesCommandArgs = (ListModulesCommandArgs) commandArgs;
Boolean started = null;
if (listModulesCommandArgs.isStarted()) {
started = Boolean.TRUE;
} else if (listModulesCommandArgs.isStopped()) {
started = Boolean.FALSE;
}
List targets = Arrays.asList(listModulesCommandArgs.getArgs());
final DeploymentManager mgr = connection.getDeploymentManager();
TargetModuleID[] running = null, notrunning = null;
Target[] tlist = identifyTargets(targets, mgr);
if(tlist.length == 0) {