コード例 #1
0
  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;
    }
  }
コード例 #2
0
  @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;
    }
  }