@Override public int parseArguments (org.kohsuke.args4j.spi.Parameters params) throws CmdLineException { String className = params.getParameter(0).trim(); if (!className.isEmpty()) { try { Class runClass = Class.forName(className); FieldSetter fs = setter.asFieldSetter(); fs.addValue(runClass); } catch (Throwable ex) { throw new CmdLineException(owner, ex); } } return 1; }
@Override public int parseArguments (org.kohsuke.args4j.spi.Parameters params) throws CmdLineException { String name = params.getParameter(-1); String pair = params.getParameter(0); FieldSetter fs = setter.asFieldSetter(); Properties props = (Properties) fs.getValue(); if (props == null) { props = new Properties(); fs.addValue(props); } try { props.load(new StringReader(pair)); } catch (Exception ex) { throw new CmdLineException(owner, "Error in " + name + " " + pair, ex); } return 1; }
@Override public FieldSetter asFieldSetter() { throw new UnsupportedOperationException(); }
@Override public FieldSetter asFieldSetter() { return proxy.asFieldSetter(); }