author | František Kučera <franta-hg@frantovo.cz> |
Sun, 22 Dec 2013 18:19:38 +0100 | |
branch | v_0 |
changeset 29 | d66858b4b563 |
parent 16 | 5b8fcd35d4d6 |
child 37 | 9e6f8e5d5f98 |
permissions | -rw-r--r-- |
16
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
1 |
/** |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
2 |
* SQL-DK |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
3 |
* Copyright © 2013 František Kučera (frantovo.cz) |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
4 |
* |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
5 |
* This program is free software: you can redistribute it and/or modify |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
6 |
* it under the terms of the GNU General Public License as published by |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
7 |
* the Free Software Foundation, either version 3 of the License, or |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
8 |
* (at your option) any later version. |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
9 |
* |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
10 |
* This program is distributed in the hope that it will be useful, |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
13 |
* GNU General Public License for more details. |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
14 |
* |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
5b8fcd35d4d6
license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents:
15
diff
changeset
|
17 |
*/ |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
package info.globalcode.sql.dk; |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
|
29
d66858b4b563
more configuration, more JAXB, more formatters
František Kučera <franta-hg@frantovo.cz>
parents:
16
diff
changeset
|
20 |
import info.globalcode.sql.dk.SQLCommand.COMMAND_TYPE; |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
21 |
import java.sql.Types; |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
22 |
import java.util.ArrayList; |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
23 |
import java.util.Collections; |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
24 |
import java.util.HashMap; |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
25 |
import java.util.List; |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
26 |
import java.util.Map; |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
27 |
|
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
28 |
/** |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
29 |
* |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
* @author Ing. František Kučera (frantovo.cz) |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
*/ |
5 | 32 |
public class CLIParser { |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
33 |
|
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
34 |
public static final String TYPE_NAME_SEPARATOR = ":"; |
5 | 35 |
private final Map<String, Integer> types; |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
36 |
|
5 | 37 |
public CLIParser() { |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
38 |
Map<String, Integer> m = new HashMap<>(); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
39 |
m.put("int", Types.INTEGER); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
40 |
m.put("string", Types.VARCHAR); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
41 |
m.put("boolean", Types.BOOLEAN); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
42 |
/** |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
43 |
* TODO: more types |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
44 |
*/ |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
45 |
types = Collections.unmodifiableMap(m); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
46 |
} |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
47 |
|
9 | 48 |
public CLIOptions parseOptions(String[] args) throws CLIParserException { |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
49 |
CLIOptions options = new CLIOptions(); |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
50 |
|
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
51 |
List<Integer> numberedTypes = new ArrayList<>(); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
52 |
Map<String, Integer> namedTypes = new HashMap<>(); |
2 | 53 |
|
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
54 |
for (int i = 0; i < args.length; i++) { |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
55 |
String arg = args[i]; |
2 | 56 |
switch (arg) { |
57 |
case Tokens.TYPES: |
|
8 | 58 |
String typesString = fetchNext(args, ++i); |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
59 |
|
10 | 60 |
for (String oneType : typesString.split(",")) { |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
61 |
int sepatratorIndex = oneType.indexOf(TYPE_NAME_SEPARATOR); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
62 |
if (sepatratorIndex == -1) { |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
63 |
numberedTypes.add(getType(oneType)); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
64 |
} else { |
12
2dcb67d90fd2
unit-test: names, types, prefix
František Kučera <franta-hg@frantovo.cz>
parents:
10
diff
changeset
|
65 |
String namePart = oneType.substring(0, sepatratorIndex).trim(); |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
66 |
String typePart = oneType.substring(sepatratorIndex + TYPE_NAME_SEPARATOR.length(), oneType.length()); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
67 |
namedTypes.put(namePart, getType(typePart)); |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
68 |
} |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
69 |
} |
2 | 70 |
break; |
71 |
case Tokens.NAME_PREFIX: |
|
8 | 72 |
options.setNamePrefix(fetchNext(args, ++i)); |
2 | 73 |
break; |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
74 |
case Tokens.DB: |
8 | 75 |
options.setDatabaseName(fetchNext(args, ++i)); |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
76 |
break; |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
77 |
case Tokens.SQL: |
8 | 78 |
options.setSql(fetchNext(args, ++i)); |
29
d66858b4b563
more configuration, more JAXB, more formatters
František Kučera <franta-hg@frantovo.cz>
parents:
16
diff
changeset
|
79 |
options.setCommandType(COMMAND_TYPE.QUERY); |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
80 |
break; |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
81 |
case Tokens.SQL_UPDATE: |
2 | 82 |
case Tokens.SQL_INSERT: |
8 | 83 |
options.setSql(fetchNext(args, ++i)); |
29
d66858b4b563
more configuration, more JAXB, more formatters
František Kučera <franta-hg@frantovo.cz>
parents:
16
diff
changeset
|
84 |
options.setCommandType(COMMAND_TYPE.UPDATE); |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
85 |
break; |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
86 |
case Tokens.BATCH: |
2 | 87 |
options.setBatch(true); |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
88 |
break; |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
89 |
case Tokens.DATA: // --data is the last option |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
90 |
for (i++; i < args.length; i++) { |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
91 |
arg = args[i]; |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
92 |
|
8 | 93 |
if (arg.startsWith(options.getNamePrefix())) { // Named parameters: |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
94 |
String paramName = arg.substring(options.getNamePrefix().length()); |
8 | 95 |
String paramValue = fetchNext(args, ++i); |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
96 |
options.addNamedParameter(new NamedParameter(paramName, paramValue, namedTypes.get(paramName))); |
8 | 97 |
} else { // Numbered parameters: |
98 |
Parameter parameter; |
|
99 |
if (numberedTypes.isEmpty()) { |
|
100 |
parameter = new Parameter(arg, null); |
|
101 |
} else { |
|
102 |
int paramIndex = options.getNumberedParameters().size(); |
|
103 |
int paramType; |
|
104 |
try { |
|
105 |
paramType = numberedTypes.get(paramIndex); |
|
106 |
} catch (IndexOutOfBoundsException e) { |
|
9 | 107 |
throw new CLIParserException("Missing type for parameter #" + paramIndex, e); |
8 | 108 |
} catch (NullPointerException e) { |
9 | 109 |
throw new CLIParserException("Invalid type definition for parameter #" + paramIndex, e); |
8 | 110 |
} |
111 |
parameter = new Parameter(arg, paramType); |
|
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
112 |
} |
8 | 113 |
options.addNumberedParameter(parameter); |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
114 |
} |
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
115 |
} |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
116 |
break; |
14 | 117 |
case Tokens.FORMATTER: |
118 |
options.setFormatterName(fetchNext(args, ++i)); |
|
119 |
break; |
|
120 |
case Tokens.INFO_HELP: |
|
121 |
options.addShowInfo(CLIOptions.INFO_TYPE.HELP); |
|
122 |
break; |
|
123 |
case Tokens.INFO_FORMATTERS: |
|
124 |
options.addShowInfo(CLIOptions.INFO_TYPE.FORMATTERS); |
|
125 |
break; |
|
126 |
case Tokens.INFO_LICENSE: |
|
127 |
options.addShowInfo(CLIOptions.INFO_TYPE.LICENSE); |
|
128 |
break; |
|
129 |
case Tokens.INFO_TYPES: |
|
130 |
options.addShowInfo(CLIOptions.INFO_TYPE.TYPES); |
|
131 |
break; |
|
132 |
case Tokens.INFO_VERSION: |
|
133 |
options.addShowInfo(CLIOptions.INFO_TYPE.VERSION); |
|
134 |
break; |
|
15
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
135 |
case Tokens.INFO_DATABASES: |
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
136 |
options.addShowInfo(CLIOptions.INFO_TYPE.DATABASES); |
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
137 |
break; |
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
138 |
case Tokens.INFO_CONNECTION: |
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
139 |
options.addShowInfo(CLIOptions.INFO_TYPE.CONNECTION); |
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
140 |
options.setDatabaseNameToTest(fetchNext(args, ++i)); |
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
141 |
break; |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
142 |
default: |
9 | 143 |
throw new CLIParserException("Unknown option: " + arg); |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
144 |
} |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
145 |
} |
8 | 146 |
return options; |
147 |
} |
|
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
148 |
|
9 | 149 |
private String fetchNext(String[] args, int index) throws CLIParserException { |
8 | 150 |
if (index < args.length) { |
151 |
return args[index]; |
|
152 |
} else { |
|
9 | 153 |
throw new CLIParserException("Expecting value for option: " + args[index - 1]); |
8 | 154 |
} |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
155 |
} |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
156 |
|
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
157 |
public static class Tokens { |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
158 |
|
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
159 |
public static final String DB = "--db"; |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
160 |
public static final String SQL = "--sql"; |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
161 |
public static final String SQL_UPDATE = "--sql-update"; |
2 | 162 |
public static final String SQL_INSERT = "--sql-insert"; |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
163 |
public static final String BATCH = "--batch"; |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
164 |
public static final String DATA = "--data"; |
2 | 165 |
public static final String NAME_PREFIX = "--name-prefix"; |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
166 |
public static final String TYPES = "--types"; |
14 | 167 |
public static final String FORMATTER = "--formatter"; |
168 |
public static final String INFO_HELP = "--help"; |
|
169 |
public static final String INFO_VERSION = "--version"; |
|
170 |
public static final String INFO_LICENSE = "--license"; |
|
171 |
public static final String INFO_FORMATTERS = "--list-formatters"; |
|
172 |
public static final String INFO_TYPES = "--list-types"; |
|
15
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
173 |
public static final String INFO_DATABASES = "--list-databases"; |
bbd335b5410c
show info basics: list databases + test connection
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
174 |
public static final String INFO_CONNECTION = "--test-connection"; |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
175 |
|
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
176 |
private Tokens() { |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
177 |
} |
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
178 |
} |
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
179 |
|
9 | 180 |
private int getType(String typeString) throws CLIParserException { |
10 | 181 |
Integer type = types.get(typeString.trim()); |
8 | 182 |
if (type == null) { |
9 | 183 |
throw new CLIParserException("Unsupported type: " + typeString); |
8 | 184 |
} else { |
185 |
return type; |
|
186 |
} |
|
4
f5c3350f3d78
data/types CLI options parsing
František Kučera <franta-hg@frantovo.cz>
parents:
3
diff
changeset
|
187 |
} |
1
f32dac78d13a
WOW some classes LOL; TODO: refactor
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
188 |
} |