本文整理了Java中net.sourceforge.argparse4j.inf.Argument.dest()
方法的一些代码示例,展示了Argument.dest()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Argument.dest()
方法的具体详情如下:
包路径:net.sourceforge.argparse4j.inf.Argument
类名称:Argument
方法名:dest
[英]The name of the attribute to be added.
The default value is For positional arguments, The default value is normally supplied as the first argument to ArgumentParser#parseArgs(String[]). For named arguments, ArgumentParser generates the default value of dest by taking the first long option string and stripping away the initial -- string. If no long option strings were supplied, destwill be derived from the first short option string by stripping the initial - character. Any internal - characters will be converted to .
[中]要添加的属性的名称。
默认值用于位置参数,默认值通常作为ArgumentParser#parseArgs(字符串[])的第一个参数提供。对于命名参数,ArgumentParser通过获取第一个长选项字符串并去掉初始的--string来生成dest的默认值。如果没有提供长选项字符串,将通过剥离初始字符从第一个短选项字符串派生dest。任何内部-字符都将转换为。
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("--migrations")
.dest("migrations-file")
.help("the file containing the Liquibase migrations for the application");
subparser.addArgument("--catalog")
.dest("catalog")
.help("Specify the database catalog (use database default if omitted)");
subparser.addArgument("--schema")
.dest("schema")
.help("Specify the database schema (use database default if omitted)");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-c", "--count")
.dest("count")
.type(Integer.class)
.help("limit script to the specified number of pending change sets");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-v", "--verbose")
.action(Arguments.storeTrue())
.dest("verbose")
.help("Output verbose information");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-n", "--dry-run")
.action(Arguments.storeTrue())
.dest("dry-run")
.setDefault(Boolean.FALSE)
.help("Output the DDL to stdout, don't run it");
subparser.addArgument("-t", "--tag").dest("tag").help("Rollback to the given tag");
subparser.addArgument("-d", "--date")
.dest("date")
.type(Date.class)
.help("Rollback to the given date");
subparser.addArgument("-c", "--count")
.dest("count")
.type(Integer.class)
.help("Rollback the specified number of change sets");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("tag-name")
.dest("tag-name")
.nargs(1)
.required(true)
.help("The tag name");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-n", "--dry-run")
.action(Arguments.storeTrue())
.dest("dry-run")
.setDefault(Boolean.FALSE)
.help("output the DDL to stdout, don't run it");
subparser.addArgument("-c", "--count")
.type(Integer.class)
.dest("count")
.help("only apply the next N change sets");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: signalapp/Signal-Server
@Override
public void configure(Subparser subparser) {
subparser.addArgument("-ca", "--ca")
.dest("ca")
.action(Arguments.storeTrue())
.setDefault(Boolean.FALSE)
.help("Generate CA parameters");
subparser.addArgument("-k", "--key")
.dest("key")
.type(String.class)
.help("The CA private signing key");
subparser.addArgument("-i", "--id")
.dest("keyId")
.type(Integer.class)
.help("The key ID to create");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-l", "--list")
.dest("list")
.action(Arguments.storeTrue())
.setDefault(Boolean.FALSE)
.help("list all open locks");
subparser.addArgument("-r", "--force-release")
.dest("release")
.action(Arguments.storeTrue())
.setDefault(Boolean.FALSE)
.help("forcibly release all open locks");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-n", "--dry-run")
.action(Arguments.storeTrue())
.dest("dry-run")
.setDefault(Boolean.FALSE)
.help("output the DDL to stdout, don't run it");
subparser.addArgument("-a", "--all")
.action(Arguments.storeTrue())
.dest("all")
.setDefault(Boolean.FALSE)
.help("mark all pending change sets as applied");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: signalapp/Signal-Server
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-v", "--verbose")
.action(Arguments.storeTrue())
.dest("verbose")
.help("Output verbose information");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: signalapp/Signal-Server
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-u", "--user")
.dest("user")
.type(String.class)
.required(true)
.help("The user to remove");
}
代码示例来源:origin: dropwizard/dropwizard
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-i", "--include-default")
.action(Arguments.storeTrue())
.dest("include-default")
.help("Also render the template with the default name");
subparser.addArgument("names").nargs("*");
}
代码示例来源:origin: signalapp/Signal-Server
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-n", "--dry-run")
.action(Arguments.storeTrue())
.dest("dry-run")
.setDefault(Boolean.FALSE)
.help("output the DDL to stdout, don't run it");
subparser.addArgument("-c", "--count")
.type(Integer.class)
.dest("count")
.help("only apply the next N change sets");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
代码示例来源:origin: dropwizard/dropwizard
.dest("output")
.help("Write output to <file> instead of stdout");
tables.addArgument("--tables")
.action(Arguments.storeTrue())
.dest("tables")
.help("Check for added or removed tables (default)");
tables.addArgument("--ignore-tables")
.action(Arguments.storeFalse())
.dest("tables")
.help("Ignore tables");
columns.addArgument("--columns")
.action(Arguments.storeTrue())
.dest("columns")
.help("Check for added, removed, or modified columns (default)");
columns.addArgument("--ignore-columns")
.action(Arguments.storeFalse())
.dest("columns")
.help("Ignore columns");
views.addArgument("--views")
.action(Arguments.storeTrue())
.dest("views")
.help("Check for added, removed, or modified views (default)");
views.addArgument("--ignore-views")
.action(Arguments.storeFalse())
.dest("views")
.help("Ignore views");
代码示例来源:origin: linkedin/kafka-monitor
.type(String.class)
.metavar("TOPIC")
.dest("topic")
.help("Produce messages to this topic and consume message from this topic");
.required(false)
.type(String.class)
.dest("producerId")
.help("The producerId will be used by producer client and encoded in the messages to the topic");
.type(String.class)
.metavar("HOST1:PORT1[,HOST2:PORT2[...]]")
.dest("brokerList")
.help("Comma-separated list of Kafka brokers in the form HOST1:PORT1,HOST2:PORT2,...");
.type(String.class)
.metavar("HOST:PORT")
.dest("zkConnect")
.help("The connection string for the zookeeper connection in the form host:port");
.type(String.class)
.metavar("RECORD_SIZE")
.dest("recordSize")
.help("The size of each record.");
.type(String.class)
.metavar("PRODUCER_CLASS_NAME")
.dest("producerClassName")
.help("Specify the class of producer. Available choices include newProducer or class name");
代码示例来源:origin: spotify/helios
.dest("parallelism")
.type(Integer.class)
.help("Number of hosts to deploy to concurrently");
代码示例来源:origin: lenskit/lenskit
public static void configureArguments(ArgumentParser parser) {
ArgumentGroup group = parser.addArgumentGroup("script environment")
.description("Options for interpreting Groovy scripts.");
group.addArgument("-C", "--classpath")
.dest("classpath")
.action(Arguments.append())
.metavar("URL")
.help("add URL (jar or dir) to script classpath");
group.addArgument("-D", "--define")
.dest("properties")
.type(new PropertyDef())
.action(Arguments.append())
.metavar("PROP=VALUE")
.help("set property PROP");
}
代码示例来源:origin: lenskit/lenskit
@Override
public void configureArguments(ArgumentParser parser) {
parser.addArgument("-o", "--output-dir")
.dest("output_dir")
.type(String.class)
.metavar("DIR")
.help("write splits to DIR");
parser.addArgument("-n", "--name")
.dest("name")
.metavar("NAME")
.help("name the data set NAME");
.action(Arguments.storeConst())
.setConst(OutputFormat.CSV_GZIP)
.dest("output_format")
.help("specify output file type");
parser.addArgument("--no-timestamps")
.action(Arguments.storeFalse())
.setDefault(true)
.dest("use_timestamps")
.help("don't include timestamps in output");
parser.addArgument("--entity-type")
.dest("partitions")
.type(Integer.class)
.help("Fold into K partitions.");
.description("Partitioning mode for the crossfolder.");
mode.addArgument("--partition-users")
.dest("crossfold_mode")
代码示例来源:origin: io.dropwizard/dropwizard-migrations
@Override
public void configure(Subparser subparser) {
super.configure(subparser);
subparser.addArgument("-c", "--count")
.dest("count")
.type(Integer.class)
.help("limit script to the specified number of pending change sets");
subparser.addArgument("-i", "--include")
.action(Arguments.append())
.dest("contexts")
.help("include change sets from the given context");
}
内容来源于网络,如有侵权,请联系作者删除!