|
62 | 62 | * supported: |
63 | 63 | * </p> |
64 | 64 | * <ul> |
65 | | - * <li>{@code #@<type> <varName>}</li> |
66 | | - * <li>{@code #@<type>(<attr1>=<value1>, ..., <attrN>=<valueN>) <varName>}</li> |
| 65 | + * <li>{@code #@ <type> <varName>}</li> |
| 66 | + * <li>{@code #@ <type>(<attr1>=<value1>, ..., <attrN>=<valueN>) <varName>}</li> |
| 67 | + * <li>{@code #@<IOType> <varName>}</li> |
67 | 68 | * <li>{@code #@<IOType> <type> <varName>}</li> |
68 | 69 | * <li>{@code #@<IOType>(<attr1>=<value1>, ..., <attrN>=<valueN>) <type> |
69 | 70 | * <varName>}</li> |
|
77 | 78 | * <li>{@code <IOType>} - one of {@code INPUT}, {@code OUTPUT}, or {@code BOTH}. |
78 | 79 | * </li> |
79 | 80 | * <li>{@code <varName>} - the name of the input or output variable.</li> |
80 | | - * <li>{@code <type>} - the Java {@link Class} of the variable.</li> |
| 81 | + * <li>{@code <type>} - the Java {@link Class} of the variable, or |
| 82 | + * {@link Object} if none specified.</li> |
81 | 83 | * <li>{@code <attr*>} - an attribute key.</li> |
82 | 84 | * <li>{@code <value*>} - an attribute value.</li> |
83 | 85 | * </ul> |
|
90 | 92 | * <ul> |
91 | 93 | * <li>{@code #@Dataset dataset}</li> |
92 | 94 | * <li>{@code #@double(type=OUTPUT) result}</li> |
93 | | - * <li>{@code #@BOTH ImageDisplay display}</li> |
94 | | - * <li>{@code #@INPUT(persist=false, visibility=INVISIBLE) boolean verbose} |
95 | | - * </li> |
| 95 | + * <li>{@code #@both ImageDisplay display}</li> |
| 96 | + * <li>{@code #@input(persist=false, visibility=INVISIBLE) boolean verbose}</li> |
| 97 | + * <li>{@code #@output thing}</li> |
96 | 98 | * </ul> |
97 | 99 | * <p> |
98 | 100 | * Parameters will be parsed and filled just like @{@link Parameter}-annotated |
@@ -187,11 +189,18 @@ private boolean parseParam(final String param, |
187 | 189 | final String typeName, varName; |
188 | 190 | final String maybeIOType = tokens[0].toUpperCase(); |
189 | 191 | if (isIOType(maybeIOType)) { |
190 | | - // assume syntax: <IOType> <type> <varName> |
191 | | - if (tokens.length < 3) return false; |
| 192 | + if (tokens.length == 2) { |
| 193 | + // <IOType> <varName> |
| 194 | + typeName = "Object"; |
| 195 | + varName = tokens[1]; |
| 196 | + } |
| 197 | + else if (tokens.length == 3) { |
| 198 | + // <IOType> <type> <varName> |
| 199 | + typeName = tokens[1]; |
| 200 | + varName = tokens[2]; |
| 201 | + } |
| 202 | + else return false; |
192 | 203 | attrs.put("type", maybeIOType); |
193 | | - typeName = tokens[1]; |
194 | | - varName = tokens[2]; |
195 | 204 | } |
196 | 205 | else { |
197 | 206 | // assume syntax: <type> <varName> |
|
0 commit comments