(List<Operation<Object, Object>> list, ChainElement element)
| 323 | } |
| 324 | |
| 325 | @SuppressWarnings("unchecked") |
| 326 | private void addNormalization(List<Operation<Object, Object>> list, ChainElement element) { |
| 327 | if (!element.hasSubtype()) return; |
| 328 | Operation<?, ?> operation = NORMALIZATION.get(element.toString()); |
| 329 | if (operation == null) { |
| 330 | List<String> normalizations = Lists.newArrayList(); |
| 331 | for (String n : NORMALIZATION.keySet()) if (n.startsWith(element.getType() + ":")) normalizations.add(n); |
| 332 | throw new IllegalArgumentException(String.format( |
| 333 | "Illegal normalization operation: %s. Valid normalizations: %s", element, Joiner.on(",").join(normalizations))); |
| 334 | } |
| 335 | list.add((Operation<Object, Object>) operation); |
| 336 | } |
| 337 | |
| 338 | @SuppressWarnings("unchecked") |
| 339 | private List<Operation<Object, Object>> compile0(String program) { |
no test coverage detected