blob: 2159c1f9dc90c32582e93beef5da796f955421c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
package com.beust.jcommander;
import static java.lang.annotation.ElementType.FIELD;
import com.beust.jcommander.validators.NoValidator;
import com.beust.jcommander.validators.NoValueValidator;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@Target({ FIELD })
public @interface DynamicParameter {
/**
* An array of allowed command line parameters (e.g. "-D", "--define", etc...).
*/
String[] names() default {};
/**
* Whether this option is required.
*/
boolean required() default false;
/**
* A description of this option.
*/
String description() default "";
/**
* The key used to find the string in the message bundle.
*/
String descriptionKey() default "";
/**
* If true, this parameter won't appear in the usage().
*/
boolean hidden() default false;
/**
* The validation class to use.
*/
Class<? extends IParameterValidator> validateWith() default NoValidator.class;
/**
* The character(s) used to assign the values.
*/
String assignment() default "=";
Class<? extends IValueValidator> validateValueWith() default NoValueValidator.class;
}
|