Class DeprecatedAttributes

java.lang.Object
org.apache.commons.cli.DeprecatedAttributes

public final class DeprecatedAttributes extends Object
Deprecated attributes.

Note: This class isn't called "Deprecated" to avoid clashing with "java.lang.Deprecated".

If you want to serialize this class, use a serialization proxy.

Since:
1.7.0
See Also:
  • Field Details

    • DEFAULT

      static final DeprecatedAttributes DEFAULT
      The default value for a DeprecatedAttributes.
    • EMPTY_STRING

      private static final String EMPTY_STRING
      The empty string.
      See Also:
    • description

      private final String description
      The description.
    • forRemoval

      private final boolean forRemoval
      Whether this option will be removed.
    • since

      private final String since
      The version label for removal.
  • Constructor Details

    • DeprecatedAttributes

      private DeprecatedAttributes(String description, String since, boolean forRemoval)
      Constructs a new instance.
      Parameters:
      description - The description.
      since - The version label for removal.
      forRemoval - Whether this option will be removed.
  • Method Details

    • builder

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

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

      public String getSince()
      Gets version in which the option became deprecated.
      Returns:
      the version in which the option became deprecated.
    • 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.
    • toEmpty

      private String toEmpty(String since)
    • toString

      public String toString()
      Overrides:
      toString in class Object