name.kevinlocke.ultragetopt
Interface GetoptErrorFormatter

All Known Implementing Classes:
BSDGetoptErrorFormatter, DarwinGetoptErrorFormatter, GNUGetoptErrorFormatter, POSIXGetoptErrorFormatter

public interface GetoptErrorFormatter

Formatter for Getopt error messages.

Author:
Kevin Locke <kwl7@cornell.edu>

Method Summary
 java.lang.String ambiguousOption(java.lang.String option, java.lang.String leaders)
          Formats an error message to indicate that the given option could not be unambiguously interpreted.
 java.lang.String missingRequiredArgument(char option, java.lang.String leaders)
          Formats an error message to indicate that the given option requires an argument and that none was found.
 java.lang.String missingRequiredArgument(java.lang.String option, java.lang.String leaders)
          Formats an error message to indicate that the given option requires an argument and that none was found.
 java.lang.String noArgumentAllowed(char option, java.lang.String leaders)
          Formats an error message to indicate that the given option does not accept any arguments.
 java.lang.String noArgumentAllowed(java.lang.String option, java.lang.String leaders)
          Formats an error message to indicate that the given option does not accept any arguments.
 java.lang.String unrecognizedOption(char option, java.lang.String leaders)
          Formats an error message to indicate that the given option was not recognized.
 java.lang.String unrecognizedOption(java.lang.String option, java.lang.String leaders)
          Formats an error message to indicate that the given option was not recognized.
 

Method Detail

noArgumentAllowed

java.lang.String noArgumentAllowed(java.lang.String option,
                                   java.lang.String leaders)
Formats an error message to indicate that the given option does not accept any arguments.

Parameters:
option - The option which does not take arguments
leaders - The leader characters of the option (e.g. "--")
Returns:
A string suitable for printing to the user to indicate this error has occurred

missingRequiredArgument

java.lang.String missingRequiredArgument(java.lang.String option,
                                         java.lang.String leaders)
Formats an error message to indicate that the given option requires an argument and that none was found.

Parameters:
option - The option which does is missing an argument
leaders - The leader characters of the option (e.g. "--")
Returns:
A string suitable for printing to the user to indicate this error has occurred

unrecognizedOption

java.lang.String unrecognizedOption(java.lang.String option,
                                    java.lang.String leaders)
Formats an error message to indicate that the given option was not recognized.

Parameters:
option - The option which was not recognized
leaders - The leader characters of the option (e.g. "--")
Returns:
A string suitable for printing to the user to indicate this error has occurred

ambiguousOption

java.lang.String ambiguousOption(java.lang.String option,
                                 java.lang.String leaders)
Formats an error message to indicate that the given option could not be unambiguously interpreted.

Parameters:
option - The option which was ambiguous
leaders - The leader characters of the option (e.g. "--")
Returns:
A string suitable for printing to the user to indicate this error has occurred

noArgumentAllowed

java.lang.String noArgumentAllowed(char option,
                                   java.lang.String leaders)
Formats an error message to indicate that the given option does not accept any arguments.

Parameters:
option - The option which does not take arguments
leaders - The leader characters of the option (e.g. "--")
Returns:
A string suitable for printing to the user to indicate this error has occurred

missingRequiredArgument

java.lang.String missingRequiredArgument(char option,
                                         java.lang.String leaders)
Formats an error message to indicate that the given option requires an argument and that none was found.

Parameters:
option - The option which does is missing an argument
leaders - The leader characters of the option (e.g. "--")
Returns:
A string suitable for printing to the user to indicate this error has occurred

unrecognizedOption

java.lang.String unrecognizedOption(char option,
                                    java.lang.String leaders)
Formats an error message to indicate that the given option was not recognized.

Parameters:
option - The option which was not recognized
leaders - The leader characters of the option (e.g. "--")
Returns:
A string suitable for printing to the user to indicate this error has occurred