private void fail(URI location, int code) throws ProvisionException { try { ReflectUtil.invokeMethod(METHOD_fail, delegate, location, code); } catch (ReflectionException ex) { Throwable cause = ex.getCause(); if (cause instanceof ProvisionException) { throw (ProvisionException) cause; } throw ex; } }
@SuppressWarnings("unchecked") private IRepository<T> loadRepository( URI location, String suffix, String type, int flags, SubMonitor monitor) throws ProvisionException { try { return (IRepository<T>) ReflectUtil.invokeMethod( METHOD_loadRepository, delegate, location, suffix, type, flags, monitor); } catch (ReflectionException ex) { Throwable cause = ex.getCause(); if (cause instanceof ProvisionException) { throw (ProvisionException) cause; } throw ex; } }