Parameter.java revision dc76d5707bd6f5b761772203e9d7c285846e8362
1package com.beust.jcommander; 2 3import static java.lang.annotation.ElementType.FIELD; 4 5import java.lang.annotation.Retention; 6import java.lang.annotation.Target; 7 8@Retention(java.lang.annotation.RetentionPolicy.RUNTIME) 9@Target({ FIELD }) 10public @interface Parameter { 11 12 /** 13 * An array of allowed command line parameters (e.g. "-d", "--outputdir", etc...). 14 * If this attribute is omitted, the field it's annotating will receive all the 15 * unparsed options. There can only be at most one such annotation. 16 */ 17 String[] names() default {}; 18 19 /** 20 * A description of this option. 21 */ 22 String description() default ""; 23 24 /** 25 * Whether this option is required. 26 */ 27 boolean required() default false; 28} 29