diff --git a/dhp-workflows/dhp-bulktag/src/main/java/eu/dnetlib/dhp/selectioncriteria/VerbResolver.java b/dhp-workflows/dhp-bulktag/src/main/java/eu/dnetlib/dhp/selectioncriteria/VerbResolver.java index a8df69ea62..f6d5394e3e 100644 --- a/dhp-workflows/dhp-bulktag/src/main/java/eu/dnetlib/dhp/selectioncriteria/VerbResolver.java +++ b/dhp-workflows/dhp-bulktag/src/main/java/eu/dnetlib/dhp/selectioncriteria/VerbResolver.java @@ -1,25 +1,29 @@ package eu.dnetlib.dhp.selectioncriteria; - -import org.reflections.Reflections; - import java.io.Serializable; import java.lang.reflect.InvocationTargetException; import java.util.Map; import java.util.stream.Collectors; +import org.reflections.Reflections; public class VerbResolver implements Serializable { private final Map> map; - public VerbResolver(){ - this.map = new Reflections("eu.dnetlib").getTypesAnnotatedWith(VerbClass.class).stream() - .collect(Collectors.toMap(v -> v.getAnnotation(VerbClass.class).value(), v->(Class)v)); + public VerbResolver() { + + this.map = + new Reflections("eu.dnetlib") + .getTypesAnnotatedWith(VerbClass.class).stream() + .collect( + Collectors.toMap( + v -> v.getAnnotation(VerbClass.class).value(), + v -> (Class) v)); } - - public Selection getSelectionCriteria(String name, String param) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { + public Selection getSelectionCriteria(String name, String param) + throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, + InstantiationException { return map.get(name).getDeclaredConstructor((String.class)).newInstance(param); - } -} \ No newline at end of file +}