/** * Like {@link #callAsync(AsyncCallable, Executor)} but using {@linkplain * MoreExecutors#directExecutor direct executor}. * * @deprecated Use {@linkplain #callAsync(AsyncCallable, Executor) the overload that requires an * executor}. For identical behavior, pass {@link MoreExecutors#directExecutor}, but * consider whether another executor would be safer, as discussed in the {@link * ListenableFuture#addListener ListenableFuture.addListener} documentation. This method is * scheduled to be removed in July 2018. */ @Deprecated @DoNotCall public <C> ListenableFuture<C> callAsync(AsyncCallable<C> combiner) { return callAsync(combiner, directExecutor()); }
private Description checkTree(Tree tree, MethodSymbol sym) { DoNotCall doNotCall = ASTHelpers.getAnnotation(sym, DoNotCall.class); if (doNotCall == null) { return NO_MATCH; } StringBuilder message = new StringBuilder("This method should not be called"); if (doNotCall.value().isEmpty()) { message.append(", see its documentation for details."); } else { message.append(": ").append(doNotCall.value()); } return buildDescription(tree).setMessage(message.toString()).build(); } }
@DoNotCall public static <V> void addCallback( ListenableFuture<V> future, FutureCallback<? super V> callback) {
/** * Like {@link #call(Callable, Executor)} but using {@linkplain MoreExecutors#directExecutor * direct executor}. * * @deprecated Use {@linkplain #call(Callable, Executor) the overload that requires an * executor}. For identical behavior, pass {@link MoreExecutors#directExecutor}, but * consider whether another executor would be safer, as discussed in the {@link * ListenableFuture#addListener ListenableFuture.addListener} documentation. This method is * scheduled to be removed in July 2018. */ @CanIgnoreReturnValue // TODO(cpovirk): Remove this @Deprecated @DoNotCall public <C> ListenableFuture<C> call(Callable<C> combiner) { return call(combiner, directExecutor()); }
@DoNotCall public static <I, O> ListenableFuture<O> transform( ListenableFuture<I> input, Function<? super I, ? extends O> function) {
@DoNotCall public static <I, O> ListenableFuture<O> transformAsync( ListenableFuture<I> input, AsyncFunction<? super I, ? extends O> function) {
@DoNotCall @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static <V, X extends Throwable> ListenableFuture<V> catching(
@DoNotCall @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") public static <V, X extends Throwable> ListenableFuture<V> catchingAsync(
@Override @DoNotCall // Only for debugging. public String toString() { // TODO(nickreid): Make this class an @AutoValue and delete this. Too many places were using the // public constructor to do so when this method was added. return toStringHelper(this).add("line", line).add("column", column).toString(); } }