Class SdkVersion

java.lang.Object
io.sentry.protocol.SdkVersion
All Implemented Interfaces:
JsonSerializable, JsonUnknown

public final class SdkVersion extends Object implements JsonUnknown, JsonSerializable
The SDK Interface describes the Sentry SDK and its configuration used to capture and transmit an event.
  • Constructor Details

    • SdkVersion

      public SdkVersion(@NotNull @NotNull String name, @NotNull @NotNull String version)
  • Method Details

    • getVersion

      @NotNull public @NotNull String getVersion()
    • setVersion

      public void setVersion(@NotNull @NotNull String version)
    • getName

      @NotNull public @NotNull String getName()
    • setName

      public void setName(@NotNull @NotNull String name)
    • addPackage

      public void addPackage(@NotNull @NotNull String name, @NotNull @NotNull String version)
    • addIntegration

      public void addIntegration(@NotNull @NotNull String integration)
    • getPackages

      @Deprecated @Nullable public @Nullable List<SentryPackage> getPackages()
      Deprecated.
      Gets installed Sentry packages as list
    • getPackageSet

      @NotNull public @NotNull Set<SentryPackage> getPackageSet()
    • getIntegrations

      @Deprecated @Nullable public @Nullable List<String> getIntegrations()
      Deprecated.
      Gets installed Sentry integration names as list
    • getIntegrationSet

      @NotNull public @NotNull Set<String> getIntegrationSet()
    • updateSdkVersion

      @NotNull public static @NotNull SdkVersion updateSdkVersion(@Nullable @Nullable SdkVersion sdk, @NotNull @NotNull String name, @NotNull @NotNull String version)
      Updates the Sdk name and version or create a new one with the given values
      Parameters:
      sdk - the SdkVersion object or null
      name - the sdk name
      version - the sdk version
      Returns:
      the SdkVersion
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getUnknown

      @Nullable public @Nullable Map<String,Object> getUnknown()
      Specified by:
      getUnknown in interface JsonUnknown
    • setUnknown

      public void setUnknown(@Nullable @Nullable Map<String,Object> unknown)
      Specified by:
      setUnknown in interface JsonUnknown
    • serialize

      public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException
      Specified by:
      serialize in interface JsonSerializable
      Throws:
      IOException