/** * Attempts to create an adapter for {@code type} annotated with {@code annotations}. This * returns the adapter if one was created, or null if this factory isn't capable of creating * such an adapter. * * <p>Implementations may use {@link Moshi#adapter} to compose adapters of other types, or * {@link Moshi#nextAdapter} to delegate to the underlying adapter of the same type. */ @CheckReturnValue @Nullable JsonAdapter<?> create(Type type, Set<? extends Annotation> annotations, Moshi moshi); }
@ParametersAreNonnullByDefault @javax.annotation.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMixinClass extends PluginDetail.MixinClass { private final Type type; private final ImmutableList<Type> interfaces; private final Mixin mixin; private final @Nullable String initMethodName; private final byte[] bytes;
@Nonnull @CheckReturnValue public PendingRequestBuilder setStatusCodeValidator(@Nullable StatusCodeValidator statusCodeValidator) { this.statusCodeValidator = statusCodeValidator; return this; }
/** * Binds a source until the next reasonable event occurs. * * @return a reusable {@link LifecycleTransformer} which unsubscribes at the correct time. */ @Nonnull @CheckReturnValue <T> LifecycleTransformer<T> bindToLifecycle(); }
@ParametersAreNonnullByDefault @javax.annotation.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableShimClass extends PluginDetail.ShimClass { private final Type type;
/** * will return false when this thread is not running anymore... * * @param runnable * @return */ @CheckReturnValue @SuppressFBWarnings("MDM_SIGNAL_NOT_SIGNALALL") // Only one thread will away on this condition private void runNext(final Runnable runnable) { toRun = runnable; submitCondition.signal(); }
/** * Returns true if this parser is liberal in what it accepts. */ @CheckReturnValue public final boolean isLenient() { return lenient; }
@ParametersAreNonnullByDefault @javax.annotation.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePointcutClass extends PluginDetail.PointcutClass { private final Type type; private final byte[] bytes; private final boolean collocateInClassLoader; private final @Nullable File pluginJar;
@CheckReturnValue @Nonnull static StatusCodeValidator wrap(@Nullable IntPredicate predicate) { return predicate == null ? ACCEPT_ALL : predicate::test; } }
/** * @return a sequence of lifecycle events */ @Nonnull @CheckReturnValue Observable<E> lifecycle();
@ParametersAreNonnullByDefault @javax.annotation.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue final class ImmutableAdviceMatcher extends AdviceMatcher { private final Advice advice;
/** Returns a Comparison from the given result of a call to {@link Comparable#compareTo(Object)} or {@link Comparator#compare(Object, Object)}. */ @SuppressFBWarnings(value = "UC_USELESS_CONDITION", justification = "Throwing Unhandled keeps the full-enumeration more explicit.") @CheckReturnValue public static Comparison from(int compareToResult) { if (compareToResult == 0) { return Comparison.EQUAL; } else if (compareToResult < 0) { return Comparison.LESSER; } else if (compareToResult > 0) { return Comparison.GREATER; } else { throw Unhandled.integerException(compareToResult); } } }
/** * Returns the next token, a {@linkplain Token#NAME property name}, and consumes it. * * @throws JsonDataException if the next token in the stream is not a property name. */ @CheckReturnValue public abstract String nextName() throws IOException;
@ParametersAreNonnullByDefault @javax.annotation.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePluginDescriptor extends PluginDescriptor { private final String id; private final ImmutableList<InstrumentationConfig> instrumentationConfigs; private final ImmutableList<String> aspects; private final @Nullable File pluginJar;
@Nonnull @CheckReturnValue public PendingRequestBuilder setRateLimiter(@Nullable RateLimiter rateLimiter) { this.rateLimiter = rateLimiter; return this; }
@CheckReturnValue public final @Nullable T fromJson(BufferedSource source) throws IOException { return fromJson(JsonReader.of(source)); }
/** * Binds a source until a specific event occurs. * * @param event the event that triggers unsubscription * @return a reusable {@link LifecycleTransformer} which unsubscribes when the event triggers. */ @Nonnull @CheckReturnValue <T> LifecycleTransformer<T> bindUntilEvent(@Nonnull E event);
@ParametersAreNonnullByDefault @javax.annotation.Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue final class ImmutableAdviceParameter implements Advice.AdviceParameter { private final Advice.ParameterKind kind;
@SuppressFBWarnings("UW_UNCOND_WAIT") @CheckReturnValue @Override public boolean tryAcquire(final int nrPermits, final long deadlineNanos)
/** * Returns a string containing only whitespace, used for each level of * indentation. If empty, the encoded document will be compact. */ @CheckReturnValue public final String getIndent() { return indent != null ? indent : ""; }