@Test public void reflectiveDeserializationManifest() throws IOException { EvaluatorUtil evaluatorUtil = new EvaluatorUtil(ConfigFactory.load()); EvaluatorManifest evaluatorManifest = evaluatorUtil.getObjectMapper() .readValue(LOADER.getResourceAsStream("core/test-manifest.json"), EvaluatorManifest.class); assertTrue(evaluatorManifest instanceof TestEvaluatorManifest); TestEvaluatorManifest testEvaluatorManifest = (TestEvaluatorManifest) evaluatorManifest; assertEquals("someTestString", testEvaluatorManifest.getTestValue()); List<Field> inputs = testEvaluatorManifest.getInputs(); assertEquals(1, inputs.size()); assertEquals("int", inputs.get(0).getName()); assertEquals(DataType.INTEGER, inputs.get(0).getType()); assertEquals(0, testEvaluatorManifest.getOutputs().size()); }
public ObjectMapper getObjectMapper() { return objectMapper; }
EvaluatorUtil { public ObjectMapper getObjectMapper() { return objectMapper; } }
EvaluatorUtil { public ObjectMapper getObjectMapper() { return objectMapper; } EvaluatorUtil(Config evaluatorConfig); }
EvaluatorUtil { public ObjectMapper getObjectMapper() { return objectMapper; } EvaluatorUtil(Config evaluatorConfig); ObjectMapper getObjectMapper(); EvaluatorManifest deserializeManifest(String manifest); EvaluatorManifest deserializeManifestFromIS(InputStream manifestStream); Optional<Evaluator> generate(String extension, File file); Optional<Evaluator> findEvaluator(String path); }
EvaluatorUtil { public ObjectMapper getObjectMapper() { return objectMapper; } EvaluatorUtil(Config evaluatorConfig); ObjectMapper getObjectMapper(); EvaluatorManifest deserializeManifest(String manifest); EvaluatorManifest deserializeManifestFromIS(InputStream manifestStream); Optional<Evaluator> generate(String extension, File file); Optional<Evaluator> findEvaluator(String path);  }