blob: 92a79bcc802773ad7a1058581e8031b345df3781 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package com.beust.jcommander;
/**
* Created by jeremysolarz on 12/15/16.
*/
public class ArgMultiNameValidator {
public static class MultiNameValidator implements IValueValidator<String> {
public static String parsedName;
public void validate(String name, String value) throws ParameterException {
parsedName = name;
}
}
@Parameter(names = { "-name1", "-name2" }, description = "Names of parameter", validateValueWith = MultiNameValidator.class, required = true)
private String parameter;
}
|