void (@NotNull String text, @NotNull Key<?> outputType) { if (StringUtil.isEmptyOrSpaces(text)) return; try { if (outputType == ProcessOutputTypes.STDOUT) { ServiceMessage serviceMessage = ServiceMessage.parse(text.trim()); if (serviceMessage == null) { processOutput.out.add(text); } else { processOutput.messages.add(serviceMessage); } } if (outputType == ProcessOutputTypes.SYSTEM) { processOutput.sys.add(text); } if (outputType == ProcessOutputTypes.STDERR) { processOutput.err.add(text); } } catch (ParseException e) { e.printStackTrace(); System.err.println(text); } }