當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。