|
29 | 29 |
|
30 | 30 | package org.scijava.ops.indexer; |
31 | 31 |
|
32 | | -import static org.scijava.ops.indexer.ProcessingUtils.blockSeparator; |
33 | | -import static org.scijava.ops.indexer.ProcessingUtils.tagElementSeparator; |
34 | | - |
35 | 32 | import java.net.URI; |
36 | 33 | import java.util.*; |
37 | 34 | import java.util.stream.Collectors; |
38 | 35 |
|
39 | 36 | import javax.annotation.processing.ProcessingEnvironment; |
40 | 37 | import javax.lang.model.element.Element; |
41 | 38 |
|
| 39 | +import static org.scijava.ops.indexer.ProcessingUtils.*; |
| 40 | + |
42 | 41 | /** |
43 | 42 | * A data structure containing all the metadata needed to define an Op |
44 | 43 | * |
@@ -89,6 +88,11 @@ abstract class OpImplData { |
89 | 88 | */ |
90 | 89 | protected final List<String> authors = new ArrayList<>(); |
91 | 90 |
|
| 91 | + /** |
| 92 | + * A {@link List} of the hints declared by this Op |
| 93 | + */ |
| 94 | + protected final List<String> hints = new ArrayList<>(); |
| 95 | + |
92 | 96 | protected final ProcessingEnvironment env; |
93 | 97 |
|
94 | 98 | /** |
@@ -186,6 +190,10 @@ private void parseImplNote(String implTag) { |
186 | 190 | else if ("names".equals(kv[0]) || "name".equals(kv[0])) { |
187 | 191 | names.addAll(Arrays.asList(value.split("\\s*,\\s*"))); |
188 | 192 | } |
| 193 | + else if ("hints".equals(kv[0])) { |
| 194 | + |
| 195 | + hints.addAll(Arrays.asList(value.split("\\s*,\\s*"))); |
| 196 | + } |
189 | 197 | else { |
190 | 198 | if (value.contains(",")) { |
191 | 199 | tags.put(kv[0], value.split(",")); |
@@ -216,6 +224,7 @@ public Map<String, Object> dumpData() { |
216 | 224 | map.put("description", description); |
217 | 225 | map.put("priority", priority); |
218 | 226 | map.put("authors", authors.toArray(String[]::new)); |
| 227 | + map.put("hints", hints.toArray(String[]::new)); |
219 | 228 | var foo = params.stream() // |
220 | 229 | .map(OpParameter::data) // |
221 | 230 | .collect(Collectors.toList()); |
|
0 commit comments