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