# Class QApplication

java.lang.Object
com.io7m.quarrel.core.QApplication

All Implemented Interfaces:
  `QApplicationType`, `QLocalizationType`

public final class QApplication extends Object implements QApplicationType
The default application configuration.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ResourceBundle`
  `applicationResources()`
  `static QApplicationBuilderType`
  `builder(QApplicationMetadata metadata)`
  Create a new application builder.
  `SortedMap<String,QCommandOrGroupType>`
  `commandTree()`
  `String`
  `format(QStringType string, Object... arguments)`
  Localize and format the given string.
  `ResourceBundle`
  `internalResources()`
  `String`
  `localize(QStringType string)`
  Localize the given string.
  `QApplicationMetadata`
  `metadata()`
  `QCommandContextType`
  `parse(List<String> arguments)`
  Parse the given command line arguments, returning an appropriate command context for execution.
  `QValueConverterDirectoryType`
  `valueConverters()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.io7m.quarrel.core.QApplicationType

  `run`

- ## Method Details

  - ### builder

    public static QApplicationBuilderType builder(QApplicationMetadata metadata)
    Create a new application builder.
    Parameters:
      `metadata` - The application metadata
    Returns:
      A new builder

  - ### metadata

    public QApplicationMetadata metadata()
    Specified by:
      `metadata` in interface `QApplicationType`
    Returns:
      The application metadata

  - ### commandTree

    public SortedMap<String,QCommandOrGroupType> commandTree()
    Specified by:
      `commandTree` in interface `QApplicationType`
    Returns:
      The tree of commands and command groups

  - ### internalResources

    public ResourceBundle internalResources()
    Specified by:
      `internalResources` in interface `QApplicationType`
    Returns:
      The internal resources used to localize strings

  - ### applicationResources

    public ResourceBundle applicationResources()
    Specified by:
      `applicationResources` in interface `QApplicationType`
    Returns:
      The application-specific resources used to localize strings

  - ### valueConverters

    public QValueConverterDirectoryType valueConverters()
    Specified by:
      `valueConverters` in interface `QApplicationType`
    Returns:
      The value converters used to parse commands

  - ### parse

    public QCommandContextType parse(List<String> arguments) throws QException
    Description copied from interface: `QApplicationType`
    Parse the given command line arguments, returning an appropriate command context for execution.
    Specified by:
      `parse` in interface `QApplicationType`
    Parameters:
      `arguments` - The arguments
    Returns:
      A command context
    Throws:
      `QException` - On errors

  - ### localize

    public String localize(QStringType string)
    Description copied from interface: `QLocalizationType`
    Localize the given string.
    Specified by:
      `localize` in interface `QLocalizationType`
    Parameters:
      `string` - The string
    Returns:
      The string

  - ### format

    public String format(QStringType string, Object... arguments)
    Description copied from interface: `QLocalizationType`
    Localize and format the given string. The localized string is treated as a format string, and formatted using `MessageFormat`.
    Specified by:
      `format` in interface `QLocalizationType`
    Parameters:
      `string` - The string
      `arguments` - The arguments
    Returns:
      The string