Package org.apache.commons.cli
Class DeprecatedAttributes
- java.lang.Object
-
- org.apache.commons.cli.DeprecatedAttributes
-
public final class DeprecatedAttributes extends java.lang.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:
Deprecated
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeprecatedAttributes.Builder
BuildsDeprecatedAttributes
.
-
Field Summary
Fields Modifier and Type Field Description (package private) static DeprecatedAttributes
DEFAULT
The default value for a DeprecatedAttributes.private java.lang.String
description
The description.private static java.lang.String
EMPTY_STRING
The empty string.private boolean
forRemoval
Whether this option will be removed.private java.lang.String
since
The version label for removal.
-
Constructor Summary
Constructors Modifier Constructor Description private
DeprecatedAttributes(java.lang.String description, java.lang.String since, boolean forRemoval)
Constructs a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeprecatedAttributes.Builder
builder()
Creates a new builder.java.lang.String
getDescription()
Gets the descriptions.java.lang.String
getSince()
Gets version in which the option became deprecated.boolean
isForRemoval()
Tests whether this option is subject to removal in a future version.private java.lang.String
toEmpty(java.lang.String since)
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT
static final DeprecatedAttributes DEFAULT
The default value for a DeprecatedAttributes.
-
EMPTY_STRING
private static final java.lang.String EMPTY_STRING
The empty string.- See Also:
- Constant Field Values
-
description
private final java.lang.String description
The description.
-
forRemoval
private final boolean forRemoval
Whether this option will be removed.
-
since
private final java.lang.String since
The version label for removal.
-
-
Constructor Detail
-
DeprecatedAttributes
private DeprecatedAttributes(java.lang.String description, java.lang.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 Detail
-
builder
public static DeprecatedAttributes.Builder builder()
Creates a new builder.- Returns:
- a new builder.
-
getDescription
public java.lang.String getDescription()
Gets the descriptions.- Returns:
- the descriptions.
-
getSince
public java.lang.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 java.lang.String toEmpty(java.lang.String since)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-