static <T> Constructor<T> getProxyConstructor(final Class<T> clazz) {
try {
// use a different custom classloader for each class-space, to avoid leaks
return (Constructor<T>) getProxyClass(clazz).getConstructor(Import.class);
} catch (final LinkageError e) {
throw new ServiceException(e);
} catch (final NoSuchMethodException e) {
// /CLOVER:OFF
throw new ServiceException(e);
} catch (final ClassNotFoundException e) {
throw new ServiceException(e);
// /CLOVER:ON
}
}