Package io.sentry.util
Class HintUtils
- java.lang.Object
-
- io.sentry.util.HintUtils
-
@Internal public final class HintUtils extends java.lang.Object
Util class dealing with Hint as not to pollute the Hint API with internal functionality
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
HintUtils.SentryConsumer<T>
static interface
HintUtils.SentryHintFallback
static interface
HintUtils.SentryNullableConsumer<T>
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Hint
createWithTypeCheckHint(java.lang.Object typeCheckHint)
static @Nullable java.lang.Object
getSentrySdkHint(@NotNull Hint hint)
static boolean
hasType(@NotNull Hint hint, @NotNull java.lang.Class<?> clazz)
static <T> void
runIfDoesNotHaveType(@NotNull Hint hint, @NotNull java.lang.Class<T> clazz, HintUtils.SentryNullableConsumer<java.lang.Object> lambda)
static <T> void
runIfHasType(@NotNull Hint hint, @NotNull java.lang.Class<T> clazz, HintUtils.SentryConsumer<T> lambda)
static <T> void
runIfHasType(@NotNull Hint hint, @NotNull java.lang.Class<T> clazz, HintUtils.SentryConsumer<T> lambda, HintUtils.SentryHintFallback fallbackLambda)
static <T> void
runIfHasTypeLogIfNot(@NotNull Hint hint, @NotNull java.lang.Class<T> clazz, ILogger logger, HintUtils.SentryConsumer<T> lambda)
static void
setTypeCheckHint(@NotNull Hint hint, java.lang.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 Detail
-
createWithTypeCheckHint
@Internal public static Hint createWithTypeCheckHint(java.lang.Object typeCheckHint)
-
setTypeCheckHint
@Internal public static void setTypeCheckHint(@NotNull @NotNull Hint hint, java.lang.Object typeCheckHint)
-
getSentrySdkHint
@Internal @Nullable public static @Nullable java.lang.Object getSentrySdkHint(@NotNull @NotNull Hint hint)
-
hasType
@Internal public static boolean hasType(@NotNull @NotNull Hint hint, @NotNull @NotNull java.lang.Class<?> clazz)
-
runIfDoesNotHaveType
@Internal public static <T> void runIfDoesNotHaveType(@NotNull @NotNull Hint hint, @NotNull @NotNull java.lang.Class<T> clazz, HintUtils.SentryNullableConsumer<java.lang.Object> lambda)
-
runIfHasType
@Internal public static <T> void runIfHasType(@NotNull @NotNull Hint hint, @NotNull @NotNull java.lang.Class<T> clazz, HintUtils.SentryConsumer<T> lambda)
-
runIfHasTypeLogIfNot
@Internal public static <T> void runIfHasTypeLogIfNot(@NotNull @NotNull Hint hint, @NotNull @NotNull java.lang.Class<T> clazz, ILogger logger, HintUtils.SentryConsumer<T> lambda)
-
runIfHasType
@Internal public static <T> void runIfHasType(@NotNull @NotNull Hint hint, @NotNull @NotNull java.lang.Class<T> clazz, HintUtils.SentryConsumer<T> lambda, HintUtils.SentryHintFallback fallbackLambda)
-
shouldApplyScopeData
@Internal public static boolean shouldApplyScopeData(@NotNull @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)- Returns:
- true if it should apply scope's data or false otherwise
-
-