class Failsafe {
  /**
   * Creates and returns a new {@link FailsafeExecutor} instance that will handle failures according to the given {@code
   * outerPolicy} and {@code policies}. The policies are composed around an execution and will handle execution results
   * in reverse, with the last policy being applied first. For example, consider:
   * <p>
   * <pre>
   *   Failsafe.with(fallback, retryPolicy, circuitBreaker).get(supplier);
   * </pre>
   * </p>
   * <p>
   * This is equivalent to composition using the the {@link FailsafeExecutor#compose(Policy) compose} method:
   * <pre>
   *   Failsafe.with(fallback).compose(retryPolicy).compose(circuitBreaker).get(supplier);
   * </pre>
   * </p>
   * These result in the following internal composition when executing a {@code runnable} or {@code supplier} and
   * handling its result:
   * <p>
   * <pre>
   *   Fallback(RetryPolicy(CircuitBreaker(Supplier)))
   * </pre>
   * </p>
   * This means the {@code CircuitBreaker} is first to evaluate the {@code Supplier}'s result, then the {@code
   * RetryPolicy}, then the {@code Fallback}. Each policy makes its own determination as to whether the result
   * represents a failure. This allows different policies to be used for handling different types of failures.
   *
   * @param <R> result type
   * @param <P> policy type
   * @throws NullPointerException if {@code outerPolicy} is null
   */
  @SafeVarargs
  public static <R, P extends Policy<R>> FailsafeExecutor<R> with(P outerPolicy, P... policies) {
    Assert.notNull(outerPolicy, "outerPolicy");
    return new FailsafeExecutor<>(Lists.of(outerPolicy, policies));
  }

  /**
   * Creates and returns a new {@link FailsafeExecutor} instance that will handle failures according to the given {@code
   * policies}. The {@code policies} are composed around an execution and will handle execution results in reverse, with
   * the last policy being applied first. For example, consider:
   * <p>
   * <pre>
   *   Failsafe.with(Arrays.asList(fallback, retryPolicy, circuitBreaker)).get(supplier);
   * </pre>
   * </p>
   * This results in the following internal composition when executing a {@code runnable} or {@code supplier} and
   * handling its result:
   * <p>
   * <pre>
   *   Fallback(RetryPolicy(CircuitBreaker(Supplier)))
   * </pre>
   * </p>
   * This means the {@code CircuitBreaker} is first to evaluate the {@code Supplier}'s result, then the {@code
   * RetryPolicy}, then the {@code Fallback}. Each policy makes its own determination as to whether the result
   * represents a failure. This allows different policies to be used for handling different types of failures.
   *
   * @param <R> result type
   * @throws NullPointerException if {@code policies} is null
   * @throws IllegalArgumentException if {@code policies} is empty
   */
  public static <R> FailsafeExecutor<R> with(List<? extends Policy<R>> policies) {<FILL_FUNCTION_BODY>}

  /**
   * Creates and returns a noop {@link FailsafeExecutor} instance that treats any exception as a failure for the
   * purposes of calling event listeners, and provides no additional failure handling.
   *
   * @param <R> result type
   * @throws NullPointerException if {@code policies} is null
   * @throws IllegalArgumentException if {@code policies} is empty
   */
  public static <R> FailsafeExecutor<R> none() {
    return new FailsafeExecutor<>(Collections.emptyList());
  }
}

    Assert.notNull(policies, "policies");
    Assert.isTrue(!policies.isEmpty(), "At least one policy must be supplied");
    return new FailsafeExecutor<>(policies);
  
<no_super_class>