Class DeprecatedInfo

java.lang.Object
io.aiven.commons.kafka.config.DeprecatedInfo

public class DeprecatedInfo extends Object
Contains the information about a deprecated ConfigKey
  • Method Details

    • builder

      public static DeprecatedInfo.Builder builder()
      Creates a new builder.
      Returns:
      a new builder.
    • getDescription

      public String getDescription()
      Gets the descriptions.
      Returns:
      the descriptions.
    • getSince

      public SinceInfo getSince()
      Gets version in which the option became deprecated.
      Returns:
      the version in which the option became deprecated.
    • overrideSince

      public void overrideSince(SinceInfo.Builder builder)
      Sets the override for this SinceInfo. The builder must define version. The groupId and artifactId are optional and will be displayed if present.
      Parameters:
      builder - the builder to define the override.
    • overrideSince

      public void overrideSince(Map<SinceInfo.OverrideRange,SinceInfo.Data> overrideMap)
      Sets the override from the Builder associated with the matching OverrideRange in the overrideMap. If multiple ranges match the last one in the map will be applied.
      Parameters:
      overrideMap - the map of OverrideRanges and builders to apply.
    • isForRemoval

      public boolean isForRemoval()
      Tests whether this option is subject to removal in a future version.
      Returns:
      whether this option is subject to removal in a future version.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • formatted

      public String formatted(String name)
      Gets a string that contains the deprecated information. The output will read: "name deprecated for removal since since: description". Where
      • name is the name argument. If name is empty, the start of the result will be "Deprecated"
      • "for removal" will not be present if forRemoval is false.
      • "since since" will contain the since text, or be omitted if since is not set.
      • ": description" will contain the description text, or be omitted if description is empty.
      Parameters:
      name - The name to use for the formatted display.
      Returns:
      the formatted information.