Class HintUtils

java.lang.Object
io.sentry.util.HintUtils

@Internal public final class HintUtils extends Object
Util class dealing with Hint as not to pollute the Hint API with internal functionality
  • Method Details

    • setIsFromHybridSdk

      public static void setIsFromHybridSdk(@NotNull @NotNull Hint hint, @NotNull @NotNull String sdkName)
    • isFromHybridSdk

      public static boolean isFromHybridSdk(@NotNull @NotNull Hint hint)
    • setEventDropReason

      public static void setEventDropReason(@NotNull @NotNull Hint hint, @NotNull @NotNull EventDropReason eventDropReason)
    • getEventDropReason

      @Nullable public static @Nullable EventDropReason getEventDropReason(@NotNull @NotNull Hint hint)
    • createWithTypeCheckHint

      public static Hint createWithTypeCheckHint(Object typeCheckHint)
    • setTypeCheckHint

      public static void setTypeCheckHint(@NotNull @NotNull Hint hint, Object typeCheckHint)
    • getSentrySdkHint

      @Nullable public static @Nullable Object getSentrySdkHint(@NotNull @NotNull Hint hint)
    • hasType

      public static boolean hasType(@NotNull @NotNull Hint hint, @NotNull @NotNull Class<?> clazz)
    • 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

      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