Package io.sentry.util
Class HintUtils
java.lang.Object
io.sentry.util.HintUtils
Util class dealing with Hint as not to pollute the Hint API with internal functionality
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic Hint
createWithTypeCheckHint
(Object typeCheckHint) static @Nullable EventDropReason
getEventDropReason
(@NotNull Hint hint) static @Nullable Object
getSentrySdkHint
(@NotNull Hint hint) static boolean
static boolean
isFromHybridSdk
(@NotNull Hint hint) static <T> void
runIfDoesNotHaveType
(@NotNull Hint hint, @NotNull Class<T> clazz, HintUtils.SentryNullableConsumer<Object> lambda) static <T> void
runIfHasType
(@NotNull Hint hint, @NotNull Class<T> clazz, HintUtils.SentryConsumer<T> lambda) static <T> void
runIfHasType
(@NotNull Hint hint, @NotNull Class<T> clazz, HintUtils.SentryConsumer<T> lambda, HintUtils.SentryHintFallback fallbackLambda) static <T> void
runIfHasTypeLogIfNot
(@NotNull Hint hint, @NotNull Class<T> clazz, ILogger logger, HintUtils.SentryConsumer<T> lambda) static void
setEventDropReason
(@NotNull Hint hint, @NotNull EventDropReason eventDropReason) static void
setIsFromHybridSdk
(@NotNull Hint hint, @NotNull String sdkName) static void
setTypeCheckHint
(@NotNull Hint hint, Object typeCheckHint) static boolean
shouldApplyScopeData
(@NotNull Hint hint) Scope's data should be applied if: Hint is of the type ApplyScopeData or Hint is not Cached (this includes a null hint)
-
Method Details
-
setIsFromHybridSdk
-
isFromHybridSdk
-
setEventDropReason
public static void setEventDropReason(@NotNull @NotNull Hint hint, @NotNull @NotNull EventDropReason eventDropReason) -
getEventDropReason
-
createWithTypeCheckHint
-
setTypeCheckHint
-
getSentrySdkHint
-
hasType
-
runIfDoesNotHaveType
public static <T> void runIfDoesNotHaveType(@NotNull @NotNull Hint hint, @NotNull @NotNull Class<T> clazz, HintUtils.SentryNullableConsumer<Object> lambda) -
runIfHasType
public static <T> void runIfHasType(@NotNull @NotNull Hint hint, @NotNull @NotNull Class<T> clazz, HintUtils.SentryConsumer<T> lambda) -
runIfHasTypeLogIfNot
public static <T> void runIfHasTypeLogIfNot(@NotNull @NotNull Hint hint, @NotNull @NotNull Class<T> clazz, ILogger logger, HintUtils.SentryConsumer<T> lambda) -
runIfHasType
public static <T> void runIfHasType(@NotNull @NotNull Hint hint, @NotNull @NotNull Class<T> clazz, HintUtils.SentryConsumer<T> lambda, HintUtils.SentryHintFallback fallbackLambda) -
shouldApplyScopeData
Scope's data should be applied if: Hint is of the type ApplyScopeData or Hint is not Cached (this includes a null hint)- Returns:
- true if it should apply scope's data or false otherwise
-