当前位置: 首页>>代码示例>>Java>>正文


Java Argument类代码示例

本文整理汇总了Java中org.kohsuke.args4j.Argument的典型用法代码示例。如果您正苦于以下问题:Java Argument类的具体用法?Java Argument怎么用?Java Argument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Argument类属于org.kohsuke.args4j包,在下文中一共展示了Argument类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setOutputPath

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(required = true, handler = PathOptionHandler.class)
public void setOutputPath(Path outputPath) {
  builder.setOutputPath(outputPath);
  normsIndexBuilder = builder.createNormsIndexBuilder();
  termsIndexBuilder = builder.createTermsIndexBuilder();
  wordsIndexBuilder = builder.createWordsIndexBuilder();
}
 
开发者ID:nlpie,项目名称:biomedicus,代码行数:8,代码来源:VocabularyInitializer.java

示例2: addChange

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(
  index = 0,
  required = true,
  multiValued = true,
  metaVar = "CHANGE",
  usage = "changes to index"
)
void addChange(String token) {
  try {
    changeArgumentParser.addChange(token, changes, null, false);
  } catch (UnloggedFailure | OrmException | PermissionBackendException e) {
    writeError("warning", e.getMessage());
  }
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:15,代码来源:IndexChangesCommand.java

示例3: setCommandArgument

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(required = true, metaVar = "<command>", index = 0, usage = "The operation to run.")
void setCommandArgument(String command) throws CmdLineException {
    try {
        m_command = Command.valueOf(command.toUpperCase());
    }
    catch (IllegalArgumentException ex) {
        throw new CmdLineException(null, String.format("Unknown command: %s", command));
    }
}
 
开发者ID:OpenNMS,项目名称:newts,代码行数:10,代码来源:Config.java

示例4: addPatchSetId

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(index = 0, required = true, multiValued = true, metaVar = "{COMMIT | CHANGE,PATCHSET}", usage = "list of commits or patch sets to review")
void addPatchSetId(final String token) {
	try {
		patchSets.add(parsePatchSet(token));
	} catch (UnloggedFailure e) {
		throw new IllegalArgumentException(e.getMessage(), e);
	}
}
 
开发者ID:gitblit,项目名称:gitblit-powertools-plugin,代码行数:9,代码来源:ReviewCommand.java

示例5: getBuildForCLI

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Override
@CLIResolver
public RunT getBuildForCLI(@Argument(required = true, metaVar = "BUILD#", usage = "Build number") String id) throws CmdLineException {
	initPython();
	if (pexec.isImplemented(44)) {
		return (RunT) pexec.execPython("get_build_for_cli", id);
	} else {
		return super.getBuildForCLI(id);
	}
}
 
开发者ID:conyx,项目名称:jenkins.py,代码行数:11,代码来源:JobPW.java

示例6: setIn

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(metaVar = "INPUT_FILE", usage = "Input file with ASLan++ specification that should be translated to ASLan, or with the ASLan specification for which the analysis result should be translated to ASLan++.")
public void setIn(File in) throws CmdLineException {
	if (readFromStdin) {
		throw new CmdLineException(getParser(), "Don't specify an input file when using the - option for reading from stdin.");
	}
	this.in = in;
}
 
开发者ID:siemens,项目名称:ASLanPPConnector,代码行数:8,代码来源:OfflineConnectorCmdLineOptions.java

示例7: setIn

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(metaVar = "ASLAN_INPUT_FILE", usage = "Input file with the ASLan specification that should be converted or verified.")
public void setIn(File in) throws CmdLineException {
	if (readFromStdin) {
		throw new CmdLineException(parser,
				"Don't specify an input file when using the - option for reading from stdin.");
	}
	this.in = in;
}
 
开发者ID:siemens,项目名称:ASLanPPConnector,代码行数:9,代码来源:XMLCommandLineOptions.java

示例8: setCommand

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
/**
 * Sets the agent command
 * @param command the command to set
 */
@Argument(index=0, required=true, metaVar="COMMAND", usage="The agent command")
protected void setCommand(final AgentCommand command) {
	this.command = command;
}
 
开发者ID:nickman,项目名称:HeliosStreams,代码行数:9,代码来源:CommandLineParser.java

示例9: setInputFile

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(required = true, metaVar = "<INPUT FILE>", usage = "Input file")
public void setInputFile(File inputFile) {
	this.inputFile = inputFile;
}
 
开发者ID:highsource,项目名称:tenra,代码行数:5,代码来源:Settings.java

示例10: setInputFile

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(required = true, index = 0, metaVar = "inputFile",
    usage = "The file or directory to be processed (mandatory).")
void setInputFile(final String inputFile) {
    this.inputFile = inputFile;
}
 
开发者ID:sosna,项目名称:pinetrail,代码行数:6,代码来源:Cleaner.java

示例11: addArgument

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
public void addArgument(Setter<?> setter, Argument a) {
  parser.addArgument(setter, a);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:4,代码来源:CmdLineParser.java

示例12: setSource

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(metaVar="sourceDir", required=true, usage="the source directory that contains gsod data to import. These must be gzip'd files")
public void setSource(File source) {
    checkArgument(source.exists(), "the source directory "+source+" does not exist");
    checkArgument(source.isDirectory(), "the source directory must be a directory");
    m_source = source;
}
 
开发者ID:OpenNMS,项目名称:newts,代码行数:7,代码来源:ImportRunner.java

示例13: setSource

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(index=0, metaVar="sourceDir", required=true, usage="the source directory that contains gsod")
public void setSource(File source) {
    checkArgument(source.exists(), "the source directory does not exist");
    checkArgument(source.isDirectory(), "the source directory must be a directory");
    m_source = source;
}
 
开发者ID:OpenNMS,项目名称:newts,代码行数:7,代码来源:MergeSort.java

示例14: setTarget

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
@Argument(index=1, metaVar="targetDir", required=true, usage="the target directory for the sourted output")
public void setTarget(File target) {
    m_targetDir = target;
    target.mkdirs();
}
 
开发者ID:OpenNMS,项目名称:newts,代码行数:6,代码来源:MergeSort.java

示例15: superGetBuildForCLI

import org.kohsuke.args4j.Argument; //导入依赖的package包/类
public RunT superGetBuildForCLI(@Argument(required = true, metaVar = "BUILD#", usage = "Build number") String id) throws CmdLineException {
	return super.getBuildForCLI(id);
}
 
开发者ID:conyx,项目名称:jenkins.py,代码行数:4,代码来源:JobPW.java


注:本文中的org.kohsuke.args4j.Argument类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。