Java 类org.kohsuke.args4j.Argument 实例源码

项目:biomedicus    文件:VocabularyInitializer.java   
@Argument(required = true, handler = PathOptionHandler.class)
public void setOutputPath(Path outputPath) {
  builder.setOutputPath(outputPath);
  normsIndexBuilder = builder.createNormsIndexBuilder();
  termsIndexBuilder = builder.createTermsIndexBuilder();
  wordsIndexBuilder = builder.createWordsIndexBuilder();
}
项目:gerrit    文件:IndexChangesCommand.java   
@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());
  }
}
项目:newts    文件:Config.java   
@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));
    }
}
项目:gitblit-powertools-plugin    文件:ReviewCommand.java   
@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);
    }
}
项目:jenkins.py    文件:JobPW.java   
@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);
    }
}
项目:ASLanPPConnector    文件:OfflineConnectorCmdLineOptions.java   
@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;
}
项目:ASLanPPConnector    文件:XMLCommandLineOptions.java   
@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;
}
项目:HeliosStreams    文件:CommandLineParser.java   
/**
 * 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;
}
项目:tenra    文件:Settings.java   
@Argument(required = true, metaVar = "<INPUT FILE>", usage = "Input file")
public void setInputFile(File inputFile) {
    this.inputFile = inputFile;
}
项目:pinetrail    文件:Cleaner.java   
@Argument(required = true, index = 0, metaVar = "inputFile",
    usage = "The file or directory to be processed (mandatory).")
void setInputFile(final String inputFile) {
    this.inputFile = inputFile;
}
项目:gerrit    文件:CmdLineParser.java   
public void addArgument(Setter<?> setter, Argument a) {
  parser.addArgument(setter, a);
}
项目:JMXMPAgent    文件:CommandLine.java   
/**
 * 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;
}
项目:newts    文件:ImportRunner.java   
@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;
}
项目:newts    文件:MergeSort.java   
@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;
}
项目:newts    文件:MergeSort.java   
@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();
}
项目:jenkins.py    文件:JobPW.java   
public RunT superGetBuildForCLI(@Argument(required = true, metaVar = "BUILD#", usage = "Build number") String id) throws CmdLineException {
    return super.getBuildForCLI(id);
}