org.kohsuke.args4j.Argument Java Examples
The following examples show how to use
org.kohsuke.args4j.Argument.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VocabularyInitializer.java From biomedicus with Apache License 2.0 | 5 votes |
@Argument(required = true, handler = PathOptionHandler.class) public void setOutputPath(Path outputPath) { builder.setOutputPath(outputPath); normsIndexBuilder = builder.createNormsIndexBuilder(); termsIndexBuilder = builder.createTermsIndexBuilder(); wordsIndexBuilder = builder.createWordsIndexBuilder(); }
Example #2
Source File: Config.java From newts with Apache License 2.0 | 5 votes |
@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)); } }
Example #3
Source File: ReviewCommand.java From gitblit-powertools-plugin with Apache License 2.0 | 5 votes |
@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); } }
Example #4
Source File: ImportRunner.java From newts with Apache License 2.0 | 4 votes |
@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; }
Example #5
Source File: MergeSort.java From newts with Apache License 2.0 | 4 votes |
@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; }
Example #6
Source File: MergeSort.java From newts with Apache License 2.0 | 4 votes |
@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(); }