code: private void handleArgListener(final Deque<String> args) {
          final String value = args.pop();
          if (value == null) {
              throw new BuildException("You must specify a classname when using the --listener argument");
          }
          listeners.addElement(value);
      }
docs: Handle --listener argument