@Override public <E> E get(Class<E> type, String attrName) { JsonNode json = data.get(attrName); if (json == null) { throw new ConfigException("Attribute " + attrName + " is required but not set"); } return model.readObject(type, json.traverse()); }
@Override public <E> E get(Class<E> type, String attrName, E defaultValue) { JsonNode json = data.get(attrName); if (json == null) { return defaultValue; } return model.readObject(type, json.traverse()); }
@Override public <T> T loadTask(Class<T> taskType) { return model.readObject(taskType, data.traverse()); }