Examples of acceptsAll()


Examples of joptsimple.OptionParser.acceptsAll()

                return true;
            }
            String[] params = new String[args.length - 1];
            System.arraycopy(args, 1, params, 0, args.length - 1);
            OptionParser optionParser = command.getOptionParser();
            optionParser.acceptsAll(asList("h", "?", "help"), "display help");
            OptionSet options = optionParser.parse(params);
            if (options.has("help"))
            {
                try
                {
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

    public void configure(Binder binder) {
        OptionParser parser = new OptionParser();
        ArgumentAcceptingOptionSpec<Integer> portSpec =
                parser.accepts("port", "The port to listen on")
                        .withOptionalArg().ofType(Integer.class).defaultsTo(8080);
        parser.acceptsAll(asList("help", "?"), "This help text");

        OptionSet options = parser.parse(args);

        if (options.has("?")) {
            try {
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

    public void run(String[] args) throws Exception {
        LogManager.resetConfiguration();
        PropertyConfigurator.configure(getClass().getResource("log4j.properties"));

        OptionParser parser =  new OptionParser();
        OptionSpec<String> zkOption = parser
                .acceptsAll(Lists.newArrayList("z"), "ZooKeeper connection string, defaults to localhost")
                .withRequiredArg().ofType(String.class)
                .defaultsTo("localhost");
        OptionSpec verboseOption = parser
                .acceptsAll(Lists.newArrayList("verbose"), "Enable debug logging");
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

        OptionParser parser =  new OptionParser();
        OptionSpec<String> zkOption = parser
                .acceptsAll(Lists.newArrayList("z"), "ZooKeeper connection string, defaults to localhost")
                .withRequiredArg().ofType(String.class)
                .defaultsTo("localhost");
        OptionSpec verboseOption = parser
                .acceptsAll(Lists.newArrayList("verbose"), "Enable debug logging");
       
        OptionSpec<Integer> hbaseMasterPortOption = parser
                .acceptsAll(ImmutableList.of("hbase-master-port"), "HBase Master web ui port number")
                .withRequiredArg().ofType(Integer.class)
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

                .withRequiredArg().ofType(String.class)
                .defaultsTo("localhost");
        OptionSpec verboseOption = parser
                .acceptsAll(Lists.newArrayList("verbose"), "Enable debug logging");
       
        OptionSpec<Integer> hbaseMasterPortOption = parser
                .acceptsAll(ImmutableList.of("hbase-master-port"), "HBase Master web ui port number")
                .withRequiredArg().ofType(Integer.class)
                .defaultsTo(60010);

        OptionSet options = null;
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

    @Override
    protected OptionParser setupOptionParser() {
        OptionParser parser = super.setupOptionParser();

        nameOption = parser
                .acceptsAll(Lists.newArrayList("n", "name"), "a name for the index")
                .withRequiredArg().ofType(String.class)
                .required();

        indexerComponentFactoryOption = parser
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

        nameOption = parser
                .acceptsAll(Lists.newArrayList("n", "name"), "a name for the index")
                .withRequiredArg().ofType(String.class)
                .required();

        indexerComponentFactoryOption = parser
                .acceptsAll(Lists.newArrayList("r", "indexer-component-factory"), "Indexer component factory class")
                .withRequiredArg().ofType(String.class).describedAs("factoryclass")
                .defaultsTo(DefaultIndexerComponentFactory.class.getName());

        indexerConfOption = parser
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

        indexerComponentFactoryOption = parser
                .acceptsAll(Lists.newArrayList("r", "indexer-component-factory"), "Indexer component factory class")
                .withRequiredArg().ofType(String.class).describedAs("factoryclass")
                .defaultsTo(DefaultIndexerComponentFactory.class.getName());

        indexerConfOption = parser
                .acceptsAll(Lists.newArrayList("c", "indexer-conf"), "Indexer configuration")
                .withRequiredArg().ofType(String.class).describedAs("indexerconf.xml");

        connectionParamOption = parser
                .acceptsAll(Lists.newArrayList("cp", "connection-param"),
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

        indexerConfOption = parser
                .acceptsAll(Lists.newArrayList("c", "indexer-conf"), "Indexer configuration")
                .withRequiredArg().ofType(String.class).describedAs("indexerconf.xml");

        connectionParamOption = parser
                .acceptsAll(Lists.newArrayList("cp", "connection-param"),
                        "A connection parameter in the form key=value. This option can be specified multiple"
                                + " times. Example: -cp solr.zk=host1,host2 -cp solr.collection=products. In case"
                                + " of update, use an empty value to remove a key: -cp solr.collection=")
                .withRequiredArg()
View Full Code Here

Examples of joptsimple.OptionParser.acceptsAll()

                                + " of update, use an empty value to remove a key: -cp solr.collection=")
                .withRequiredArg()
                .withValuesConvertedBy(new StringPairConverter())
                .describedAs("key=value");

        lifecycleStateOption = parser
                .acceptsAll(Lists.newArrayList("lifecycle"), "Lifecycle state, one of "
                        + LifecycleState.ACTIVE + ", " + LifecycleState.DELETE_REQUESTED)
                .withRequiredArg()
                .withValuesConvertedBy(new EnumConverter<LifecycleState>(LifecycleState.class))
                .defaultsTo(LifecycleState.DEFAULT)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.