org.kohsuke.args4j.spi.Setter Java Examples

The following examples show how to use org.kohsuke.args4j.spi.Setter. 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: CLI.java    From audiveris with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Create a PropertyOptionHandler.
 *
 * @param parser Command line argument owner
 * @param option Run-time copy of the Option or Argument annotation
 * @param setter Setter interface
 */
public PropertyOptionHandler (CmdLineParser parser,
                              OptionDef option,
                              Setter<? super Properties> setter)
{
    super(parser, option, setter);

    if (setter.asFieldSetter() == null) {
        throw new IllegalArgumentException(
                "PropertyOptionHandler can only work with fields");
    }
}
 
Example #2
Source File: OptionalOptionHandler.java    From heroic with Apache License 2.0 5 votes vote down vote up
public OptionalOptionHandler(
    CmdLineParser parser, OptionDef option, Setter<? super Optional<?>> setter
) {
    super(parser, option, setter);

    final Field f = (Field) setter.asFieldSetter().asAnnotatedElement();
    final ParameterizedType p = (ParameterizedType) f.getGenericType();
    this.type = p.getActualTypeArguments()[0];
}
 
Example #3
Source File: URIOptionHandler.java    From laser with Apache License 2.0 4 votes vote down vote up
public URIOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super URI> setter) {
    super(parser, option, setter);
}
 
Example #4
Source File: QueryMultiSetOptionHandler.java    From buck with Apache License 2.0 4 votes vote down vote up
public QueryMultiSetOptionHandler(CmdLineParser parser, OptionDef option, Setter<String> setter) {
  super(parser, option, setter);
}
 
Example #5
Source File: RegexOptionHandler.java    From zoocreeper with Apache License 2.0 4 votes vote down vote up
public RegexOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super Pattern> setter) {
    super(parser, option, setter);
}
 
Example #6
Source File: ZooKeeperPathOptionHandler.java    From zoocreeper with Apache License 2.0 4 votes vote down vote up
public ZooKeeperPathOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super String> setter) {
    super(parser, option, setter);
}
 
Example #7
Source File: Main.java    From log-synth with Apache License 2.0 4 votes vote down vote up
public SizeParser(CmdLineParser parser, OptionDef option, Setter<? super Integer> setter) {
    super(parser, option, setter);
}
 
Example #8
Source File: EnvironmentOverrideOptionHandler.java    From buck with Apache License 2.0 4 votes vote down vote up
public EnvironmentOverrideOptionHandler(
    CmdLineParser parser, OptionDef option, Setter<? super Map<?, ?>> setter) {
  super(parser, option, setter);
}
 
Example #9
Source File: PairedStringOptionHandler.java    From buck with Apache License 2.0 4 votes vote down vote up
public PairedStringOptionHandler(
    CmdLineParser parser, OptionDef option, Setter<? super Pair<String, String>> setter) {
  super(parser, option, setter);
}
 
Example #10
Source File: SingleStringSetOptionHandler.java    From buck with Apache License 2.0 4 votes vote down vote up
public SingleStringSetOptionHandler(
    CmdLineParser parser, OptionDef option, Setter<? super Supplier<ImmutableSet<String>>> setter)
    throws CmdLineException {
  super(parser, option, setter);
  setter.addValue(supplier);
}
 
Example #11
Source File: ConsumeAllOptionsHandler.java    From buck with Apache License 2.0 4 votes vote down vote up
public ConsumeAllOptionsHandler(
    CmdLineParser parser, OptionDef option, Setter<? super String> setter) {
  super(parser, option, setter);
}
 
Example #12
Source File: TestSelectorOptions.java    From buck with Apache License 2.0 4 votes vote down vote up
public TestSelectorsOptionHandler(
    CmdLineParser parser, OptionDef option, Setter<Supplier<TestSelectorList>> setter)
    throws CmdLineException {
  super(parser, option, setter);
  setter.addValue(MoreSuppliers.memoize(builder::build));
}
 
Example #13
Source File: ListGpuParameterHandler.java    From sheepit-client with GNU General Public License v2.0 4 votes vote down vote up
public ListGpuParameterHandler(CmdLineParser parser, OptionDef option, Setter<? super T> setter) {
	super(parser, option, setter);
}
 
Example #14
Source File: VersionParameterHandler.java    From sheepit-client with GNU General Public License v2.0 4 votes vote down vote up
public VersionParameterHandler(CmdLineParser parser, OptionDef option, Setter<? super T> setter) {
	super(parser, option, setter);
}
 
Example #15
Source File: TimestampOptionHandler.java    From newts with Apache License 2.0 4 votes vote down vote up
public TimestampOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super Timestamp> setter) {
    super(parser, option, setter);
}
 
Example #16
Source File: DurationOptionHandler.java    From newts with Apache License 2.0 4 votes vote down vote up
public DurationOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super Duration> setter) {
    super(parser, option, setter);
}
 
Example #17
Source File: ResourceOptionHandler.java    From newts with Apache License 2.0 4 votes vote down vote up
public ResourceOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super Resource> setter) {
    super(parser, option, setter);
}
 
Example #18
Source File: EnumArrayOptionHandler.java    From incubator-pinot with Apache License 2.0 4 votes vote down vote up
public EnumArrayOptionHandler(CmdLineParser parser, OptionDef option, Setter<T> setter) {
  super(parser, option, setter);
}
 
Example #19
Source File: InputOutputSelectorOptionHandler.java    From dashencrypt with Mozilla Public License 2.0 4 votes vote down vote up
public InputOutputSelectorOptionHandler(CmdLineParser parser, OptionDef option,
                                         Setter<? super InputOutputSelector> setter) {
    super(parser, option, setter);
}
 
Example #20
Source File: CommandLineRunner.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
private WarningGuardSetter(
    Setter<? super String> proxy, CheckLevel level) {
  this.proxy = proxy;
  this.level = level;
}
 
Example #21
Source File: CommandLineRunner.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
public WarningGuardOffOptionHandler(
    CmdLineParser parser, OptionDef option,
    Setter<? super String> setter) {
  super(parser, option, new WarningGuardSetter(setter, CheckLevel.OFF));
}
 
Example #22
Source File: CommandLineRunner.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
public WarningGuardWarningOptionHandler(
    CmdLineParser parser, OptionDef option,
    Setter<? super String> setter) {
  super(parser, option,
      new WarningGuardSetter(setter, CheckLevel.WARNING));
}
 
Example #23
Source File: CommandLineRunner.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
public WarningGuardErrorOptionHandler(
    CmdLineParser parser, OptionDef option,
    Setter<? super String> setter) {
  super(parser, option, new WarningGuardSetter(setter, CheckLevel.ERROR));
}
 
Example #24
Source File: CommandLineRunner.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
public BooleanOptionHandler(
    CmdLineParser parser, OptionDef option,
    Setter<? super Boolean> setter) {
  super(parser, option, setter);
}
 
Example #25
Source File: SplitOptionHandler.java    From p3-batchrefine with Apache License 2.0 4 votes vote down vote up
public SplitOptionHandler(CmdLineParser parser, OptionDef option, Setter<ImmutablePair> setter) {
    super(parser, option, setter);
}
 
Example #26
Source File: BooleanOptionHandler.java    From MOE with Apache License 2.0 4 votes vote down vote up
public BooleanOptionHandler(
    CmdLineParser parser, OptionDef option, Setter<? super Boolean> setter) {
  super(parser, option, setter);
}
 
Example #27
Source File: Closure_83_CommandLineRunner_s.java    From coming with MIT License 4 votes vote down vote up
public BooleanOptionHandler(
    CmdLineParser parser, OptionDef option,
    Setter<? super Boolean> setter) {
  super(parser, option, setter);
}
 
Example #28
Source File: Closure_83_CommandLineRunner_t.java    From coming with MIT License 4 votes vote down vote up
public BooleanOptionHandler(
    CmdLineParser parser, OptionDef option,
    Setter<? super Boolean> setter) {
  super(parser, option, setter);
}
 
Example #29
Source File: Closure_107_CommandLineRunner_s.java    From coming with MIT License 4 votes vote down vote up
private WarningGuardSetter(
    Setter<? super String> proxy, CheckLevel level) {
  this.proxy = proxy;
  this.level = level;
}
 
Example #30
Source File: Closure_107_CommandLineRunner_s.java    From coming with MIT License 4 votes vote down vote up
public WarningGuardOffOptionHandler(
    CmdLineParser parser, OptionDef option,
    Setter<? super String> setter) {
  super(parser, option, new WarningGuardSetter(setter, CheckLevel.OFF));
}