コード例 #1
0
ファイル: VfsUtils.java プロジェクト: xuliugen/koala-project
  protected static Object invokeVfsMethod(Method method, Object target, Object... args)
      throws IOException {
    try {
      return method.invoke(target, args);
    } catch (InvocationTargetException ex) {
      Throwable targetEx = ex.getTargetException();
      if (targetEx instanceof IOException) {
        throw (IOException) targetEx;
      }
      ReflectionUtils.handleInvocationTargetException(ex);
    } catch (Exception ex) {
      ReflectionUtils.handleReflectionException(ex);
    }

    throw new IllegalStateException("Invalid code path reached");
  }