public static final class RxDogTag.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
RxDogTag.Builder |
addIgnoredPackages(java.util.Collection<java.lang.String> packages) |
RxDogTag.Builder |
addIgnoredPackages(java.lang.String... packages) |
RxDogTag.Builder |
addObserverHandlers(java.util.Collection<ObserverHandler> handlers) |
RxDogTag.Builder |
addObserverHandlers(ObserverHandler... handlers) |
RxDogTag.Builder |
configureWith(RxDogTag.Configurer configurer)
Can be used to compose this builder with a
RxDogTag.Configurer in a way that doesn't break the
builder chain. |
RxDogTag.Builder |
disableAnnotations()
Disables stacktrace annotations.
|
RxDogTag.Builder |
disableRepackagingOnErrorNotImplementedExceptions()
By default, RxDogTag will repackage
OnErrorNotImplementedExceptions with its own custom, simplified one with no stacktrace and
the original cause's message copied in. |
RxDogTag.Builder |
guardObserverCallbacks(boolean guardObserverCallbacks) |
void |
install()
Initializes RxDogTag by installing custom onSubscribe hooks via
RxJavaPlugins. |
public RxDogTag.Builder disableAnnotations()
RxDogTag.STACK_ELEMENT_TRACE_HEADER will be
present in the stack if this is disabled.public RxDogTag.Builder addObserverHandlers(ObserverHandler... handlers)
handlers - any number of ObserverHandler instances to potentially unpack or
decorate observers. Note that order matters here, and the first one to return a LambdaConsumerIntrospection with no custom error handling will be used.public RxDogTag.Builder addObserverHandlers(java.util.Collection<ObserverHandler> handlers)
handlers - a list of ObserverHandler instances to potentially unpack or decorate
observers. Note that order matters here, and the first one to return a LambdaConsumerIntrospection with no custom error handling will be used.public RxDogTag.Builder addIgnoredPackages(java.lang.String... packages)
packages - ignorable packages. Useful if decorating observers that you know can be
safely ignored when deducing a target subscribe() point. It's recommended that classes in
these packages have their names kept in Proguard/R8 obfuscation as well.public RxDogTag.Builder addIgnoredPackages(java.util.Collection<java.lang.String> packages)
packages - ignorable packages. Useful if decorating observers that you know can be
safely ignored when deducing a target subscribe() point. It's recommended that classes in
these packages have their names kept in Proguard/R8 obfuscation as well.public RxDogTag.Builder guardObserverCallbacks(boolean guardObserverCallbacks)
guardObserverCallbacks - Guards observer callbacks so that any exceptions that occur
during observer callbacks are intercepted and routed to RxDogTag's error handling that
will give you more info on the subscription point. Set to true by default.public RxDogTag.Builder configureWith(RxDogTag.Configurer configurer)
RxDogTag.Configurer in a way that doesn't break the
builder chain.
Example:
RxDogTag.builder()
.configureWith(AutoDisposeConfigurer::configure)
.install();
configurer - an RxDogTag.Configurer instance to be called.public RxDogTag.Builder disableRepackagingOnErrorNotImplementedExceptions()
OnErrorNotImplementedExceptions with its own custom, simplified one with no stacktrace and
the original cause's message copied in. This is effectively the same behavior as any other
type of exception.
If you don't want this behavior, you can use this configuration to disable that behavior.
This should only be disabled if you throw your own custom OnErrorNotImplementedException that you want visible in the stacktrace.
public void install()
RxJavaPlugins. Note
that calling this calls the following methods:
RxJavaPlugins.setOnFlowableSubscribe(BiFunction)
RxJavaPlugins.setOnObservableSubscribe(BiFunction)
RxJavaPlugins.setOnMaybeSubscribe(BiFunction)
RxJavaPlugins.setOnSingleSubscribe(BiFunction)
RxJavaPlugins.setOnCompletableSubscribe(BiFunction)