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.dynamicproxy;
13  
14  import org.hyphenType.datastructure.Options;
15  import org.hyphenType.exit.StatusCode;
16  import org.hyphenType.lexerparser.OptionValues;
17  
18  /**
19   * @author Aurelio Akira M. Matsui
20   * @param <T>
21   *            The option interface type.
22   */
23  public class ConcreteArgumentsInvocationHandler<T extends Options<?>> extends AbstractArgumentsInvocationHandler<T> {
24  
25      /**
26       * TODO Comment.
27       * 
28       * @param optionValues
29       *            TODO Comment.
30       * @param formatter
31       *            TODO Comment.
32       * @param exitCodeEnumClass
33       *            TODO Comment.
34       * @param rawArguments
35       *            TODO Comment.
36       */
37      public ConcreteArgumentsInvocationHandler(final OptionValues<T> optionValues, Class<? extends Options<?>> optionsInterface, final Class<? extends StatusCode> exitCodeEnumClass, final String[] rawArguments) {
38          super(optionValues, optionsInterface, exitCodeEnumClass, rawArguments);
39      }
40  
41      /**
42       * TODO Comment.
43       * 
44       * @param e
45       *            TODO Comment.
46       */
47      @Override
48      protected final void exit(final Enum<?> e) {
49          System.exit(e.ordinal());
50      }
51  
52      /**
53       * TODO Comment.
54       * 
55       * @param code
56       *            TODO Comment.
57       */
58      @Override
59      protected final void exit(final int code) {
60          System.exit(code);
61      }
62  }