package eu.eudat.model.publicapi; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.reflect.InvocationTargetException; public class HintedModelFactory { private static final Logger logger = LoggerFactory.getLogger(HintedModelFactory.class); public static > String getHint(Class clazz) { try { return clazz.getDeclaredConstructor().newInstance().getHint(); } catch (InstantiationException | IllegalAccessException e) { logger.error(e.getMessage(), e); return null; } catch (InvocationTargetException | NoSuchMethodException e) { throw new RuntimeException(e); } } }