com.quorum.tessera.reflect.ReflectCallback Maven / Gradle / Ivy
package com.quorum.tessera.reflect;
import java.lang.reflect.InvocationTargetException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@FunctionalInterface
public interface ReflectCallback {
Logger LOGGER = LoggerFactory.getLogger(ReflectCallback.class);
T doExecute() throws ClassNotFoundException,
NoSuchFieldException,
IllegalArgumentException,
IllegalAccessException,
NoSuchMethodException,
InvocationTargetException,
InstantiationException;
static T execute(ReflectCallback callback) {
try {
return callback.doExecute();
} catch (InstantiationException | NoSuchMethodException | InvocationTargetException
| IllegalArgumentException | IllegalAccessException | NoSuchFieldException | ClassNotFoundException ex) {
LOGGER.error(null, ex);
throw new ReflectException(ex);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy