# Deprecated API

## Contents

- Classes
- Fields
- Methods
- Constructors

- Deprecated Classes
  Class
  Description
  org.apache.commons.cli.BasicParser
  Since 1.3, use the `DefaultParser` instead.
  org.apache.commons.cli.GnuParser
  Since 1.3, use the `DefaultParser` instead.
  org.apache.commons.cli.HelpFormatter
  Use `HelpFormatter`.
  org.apache.commons.cli.OptionBuilder
  Since 1.3, use `Option.builder(String)` instead.
  org.apache.commons.cli.Parser
  Since 1.3, the two-pass parsing with the flatten method is not enough flexible to handle complex cases.
  org.apache.commons.cli.PosixParser
  Since 1.3, use the `DefaultParser` instead.

- Deprecated Fields
  Field
  Description
  org.apache.commons.cli.DefaultParser.stopAtNonOption
  Use `DefaultParser.nonOptionAction` instead. This field is unused, and left for binary compatibility reasons.
  org.apache.commons.cli.HelpFormatter.defaultArgName
  Scope will be made private for next major version - use get/setArgName methods instead.
  org.apache.commons.cli.HelpFormatter.defaultDescPad
  Scope will be made private for next major version - use get/setDescPadding methods instead.
  org.apache.commons.cli.HelpFormatter.defaultLeftPad
  Scope will be made private for next major version - use get/setLeftPadding methods instead.
  org.apache.commons.cli.HelpFormatter.defaultLongOptPrefix
  Scope will be made private for next major version - use get/setLongOptPrefix methods instead.
  org.apache.commons.cli.HelpFormatter.defaultNewLine
  Scope will be made private for next major version - use get/setNewLine methods instead.
  org.apache.commons.cli.HelpFormatter.defaultOptPrefix
  Scope will be made private for next major version - use get/setOptPrefix methods instead.
  org.apache.commons.cli.HelpFormatter.defaultSyntaxPrefix
  Scope will be made private for next major version - use get/setSyntaxPrefix methods instead.
  org.apache.commons.cli.HelpFormatter.defaultWidth
  Scope will be made private for next major version - use get/setWidth methods instead.

- Deprecated Methods
  Method
  Description
  org.apache.commons.cli.CommandLine.Builder.build()
  Use `CommandLine.Builder.get()`.
  org.apache.commons.cli.CommandLine.getOptionObject(char)
  due to System.err message; use `CommandLine.getParsedOptionValue(char)` instead.
  org.apache.commons.cli.CommandLine.getOptionObject(String)
  due to System.err message; use `CommandLine.getParsedOptionValue(String)` instead.
  org.apache.commons.cli.DefaultParser.Builder.build()
  Use `DefaultParser.Builder.get()`.
  org.apache.commons.cli.Option.addValue(String)
  Unused.
  org.apache.commons.cli.Option.Builder.build()
  Use `Option.Builder.get()`.
  org.apache.commons.cli.Option.setType(Object)
  Since 1.3, use `Option.setType(Class)` instead.
  org.apache.commons.cli.OptionBuilder.withType(Object)
  Since 1.3, use `OptionBuilder.withType(Class)` instead.
  org.apache.commons.cli.PatternOptionBuilder.getValueClass(char)
  Use `PatternOptionBuilder.getValueType(char)`.
  org.apache.commons.cli.TypeHandler.createFiles(String)
  Without replacement.
  org.apache.commons.cli.TypeHandler.createNumber(String)
  org.apache.commons.cli.TypeHandler.createObject(String)
  Use `TypeHandler.createValue(String, Class)`.
  org.apache.commons.cli.TypeHandler.createValue(String, Object)
  Use `TypeHandler.createValue(String, Class)`.
  org.apache.commons.cli.TypeHandler.openFile(String)
  Use `TypeHandler.createValue(String, Class)`.

- Deprecated Constructors
  Constructor
  Description
  org.apache.commons.cli.CommandLine.Builder()
  Use `CommandLine.builder()`.
  org.apache.commons.cli.DeprecatedAttributes.Builder()
  Use `DeprecatedAttributes.builder()`.
  org.apache.commons.cli.PatternOptionBuilder()
  Will be private or class will be final.