# Deprecated API

## Contents

- Classes
- Fields
- Methods

- 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.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.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.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.Option.addValue(String)
  Unused.
  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)`