Package org.apache.commons.cli
Class DeprecatedAttributes
java.lang.Object
org.apache.commons.cli.DeprecatedAttributes
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:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final DeprecatedAttributes
The default value for a DeprecatedAttributes.private final String
The description.private static final String
The empty string.private final boolean
Whether this option will be removed.private final String
The version label for removal. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
DeprecatedAttributes
(String description, String since, boolean forRemoval) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic DeprecatedAttributes.Builder
builder()
Creates a new builder.Gets the descriptions.getSince()
Gets version in which the option became deprecated.boolean
Tests whether this option is subject to removal in a future version.private String
toString()
-
Field Details
-
DEFAULT
The default value for a DeprecatedAttributes. -
EMPTY_STRING
The empty string.- See Also:
-
description
The description. -
forRemoval
private final boolean forRemovalWhether this option will be removed. -
since
The version label for removal.
-
-
Constructor Details
-
DeprecatedAttributes
Constructs a new instance.- Parameters:
description
- The description.since
- The version label for removal.forRemoval
- Whether this option will be removed.
-
-
Method Details
-
builder
Creates a new builder.- Returns:
- a new builder.
-
getDescription
Gets the descriptions.- Returns:
- the descriptions.
-
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
-
toString
-