# 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. Instead use getParsedOptionValue(char)
  org.apache.commons.cli.CommandLine.getOptionObject(String)
  due to System.err message. Instead use getParsedOptionValue(String)
  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)
  with no 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.