View Javadoc

1   /*
2    * This file is part of hyphenType. hyphenType is free software: you can
3    * redistribute it and/or modify it under the terms of the GNU General Public
4    * License as published by the Free Software Foundation, either version 3 of the
5    * License, or (at your option) any later version. hyphenType is distributed in
6    * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
7    * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
8    * the GNU General Public License for more details. You should have received a
9    * copy of the GNU General Public License along with hyphenType. If not, see
10   * <http://www.gnu.org/licenses/>.
11   */
12  package org.hyphenType.datastructure.annotations;
13  
14  import java.io.File;
15  import java.lang.annotation.ElementType;
16  import java.lang.annotation.Retention;
17  import java.lang.annotation.RetentionPolicy;
18  import java.lang.annotation.Target;
19  
20  /**
21   * @author Aurelio Akira M. Matsui
22   */
23  @Retention(RetentionPolicy.RUNTIME)
24  @Target(ElementType.METHOD)
25  public @interface OptionValue {
26      String name() default "";
27  
28      String option();
29  
30      boolean mandatory() default false;
31  
32      /**
33       * The separator that a user can use to separate elements of arrays, if the
34       * type of this option value is an array. This parameter will be ignored if
35       * the type of this option value is not an array.
36       * 
37       * @return The separator for array values.
38       */
39      String arraySeparator() default ",";
40  
41      /**
42       * If true and if the type of this option value is an array, hyphenType will
43       * use {@link File#pathSeparator} despite of the value of
44       * {@link OptionValue#arraySeparator()}. Setting this parameter to true
45       * makes it easy to build arrays that behave accordingly to the platform.
46       * 
47       * @return
48       */
49      boolean arrayUseFileSeparator() default false;
50  }