/** * Auto-discovers {@link OptionHandler}s and add them to the given command line parser. */ protected void registerOptionHandlers() { try { for (Class c : Index.list(OptionHandlerExtension.class, Jenkins.getActiveInstance().pluginManager.uberClassLoader,Class.class)) { Type t = Types.getBaseClass(c, OptionHandler.class); CmdLineParser.registerHandler(Types.erasure(Types.getTypeArgument(t,0)), c); } } catch (IOException e) { throw new Error(e); } }
public ExplGenOptions() { CmdLineParser.registerHandler(String[].class, StringArrayOptionHandler.class); }
/** * Auto-discovers {@link OptionHandler}s and add them to the given command line parser. */ protected void registerOptionHandlers() { try { for (Class c : Index.list(OptionHandlerExtension.class,Hudson.getInstance().pluginManager.uberClassLoader,Class.class)) { Type t = Types.getBaseClass(c, OptionHandler.class); CmdLineParser.registerHandler(Types.erasure(Types.getTypeArgument(t,0)), c); } } catch (IOException e) { throw new Error(e); } }
/** * Auto-discovers {@link OptionHandler}s and add them to the given command line parser. */ protected void registerOptionHandlers() { try { for (Class c : Index.list(OptionHandlerExtension.class, Jenkins.getActiveInstance().pluginManager.uberClassLoader,Class.class)) { Type t = Types.getBaseClass(c, OptionHandler.class); CmdLineParser.registerHandler(Types.erasure(Types.getTypeArgument(t,0)), c); } } catch (IOException e) { throw new Error(e); } }
/** * Auto-discovers {@link OptionHandler}s and add them to the given command line parser. */ protected void registerOptionHandlers() { try { for (Class c : Index.list(OptionHandlerExtension.class,Hudson.getInstance().pluginManager.uberClassLoader,Class.class)) { Type t = Types.getBaseClass(c, OptionHandler.class); CmdLineParser.registerHandler(Types.erasure(Types.getTypeArgument(t,0)), c); } } catch (IOException e) { throw new Error(e); } }
/** * Auto-discovers {@link OptionHandler}s and add them to the given command line parser. */ protected void registerOptionHandlers() { try { for (Class c : Index.list(OptionHandlerExtension.class,Hudson.getInstance().pluginManager.uberClassLoader,Class.class)) { Type t = Types.getBaseClass(c, OptionHandler.class); CmdLineParser.registerHandler(Types.erasure(Types.getTypeArgument(t,0)), c); } } catch (IOException e) { throw new Error(e); } }
/** * Auto-discovers {@link OptionHandler}s and add them to the given command * line parser. */ protected void registerOptionHandlers() { try { for (Class c : Index.list(OptionHandlerExtension.class, Hudson.getInstance().pluginManager.uberClassLoader, Class.class)) { Type t = Types.getBaseClass(c, OptionHandler.class); CmdLineParser.registerHandler(Types.erasure(Types.getTypeArgument(t, 0)), c); } } catch (IOException e) { throw new Error(e); } }
CmdLineParser.registerHandler(ComparisonCriterion.class, CriterionOptionHandler.class); DelpOptions options = new DelpOptions(); CmdLineParser cmdLineParser = new CmdLineParser(options);