public class SyntaxUsage extends Object
syntax packages
and
syntaxes
.Modifier and Type | Field and Description |
---|---|
static int |
FILL_LENGTH |
static int |
MAX_LINE_LENGTH |
static int |
NROFF |
static int |
TEXT |
Constructor and Description |
---|
SyntaxUsage(Locale locale)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addPackage(SyntaxPackage syntaxPackage)
Registers the given package with the usage generator.
|
void |
addPackages(Set<SyntaxPackage> packages)
Registers all syntax packages in the given set with the usage
generator.
|
Set<String> |
getPrimaryTopics()
Gets a list of all primary topics associated with this SyntaxUsage.
|
Set<String> |
getTopics()
Gets all of the topics associated with this SyntaxUsage.
|
void |
printDescription(PrintWriter writer,
Syntax syntax,
int format)
Prints a short message describing the command associated with
the specified syntax.
|
void |
printHelp(PrintWriter writer,
Syntax syntax)
Prints the usage help message for the specified syntax.
|
void |
printHelp(String topic,
PrintWriter writer)
Prints the usage message for the specified syntax.
|
void |
printHelpText(PrintWriter writer,
Syntax syntax,
int format)
Prints a long help message describing the behaviour of the command
associated with the specified syntax.
|
void |
printUsage(PrintWriter writer,
Syntax syntax,
int format)
Prints the usage message for the specified syntax.
|
void |
printUsage(String topic,
PrintWriter writer,
int format)
Prints the usage message for the specified syntax.
|
void |
printUsageDetails(PrintWriter writer,
Syntax syntax,
int format)
Print the usage details message for the specified syntax.
|
public static final int TEXT
public static final int NROFF
public static final int FILL_LENGTH
public static final int MAX_LINE_LENGTH
public SyntaxUsage(Locale locale)
locale
- context locale for generating usage stringpublic void addPackage(SyntaxPackage syntaxPackage)
syntaxPackage
- syntax package to be addedpublic void addPackages(Set<SyntaxPackage> packages)
packages
- set of syntax packages to be addedpublic Set<String> getTopics()
public Set<String> getPrimaryTopics()
public void printUsage(String topic, PrintWriter writer, int format)
topic
- help topic for which to generate usage help messagewriter
- PrintWriter to which output should be generatedformat
- desired output format TEXT
, etc.public void printHelp(String topic, PrintWriter writer)
topic
- help topic for which to generate usage help messagewriter
- PrintWriter to which output should be generatedpublic void printHelp(PrintWriter writer, Syntax syntax)
writer
- PrintWriter to which output should be generatedsyntax
- syntax for which to generate usage help messagepublic void printDescription(PrintWriter writer, Syntax syntax, int format)
writer
- PrintWriter to which output should be generatedsyntax
- syntax for which to generate description messageformat
- desired output format TEXT
, etc.public void printHelpText(PrintWriter writer, Syntax syntax, int format)
writer
- PrintWriter to which output should be generatedsyntax
- syntax for which to generate help messageformat
- desired output format TEXT
, etc.public void printUsage(PrintWriter writer, Syntax syntax, int format)
writer
- PrintWriter to which output should be generatedsyntax
- syntax for which to generate usage help messageformat
- desired output format TEXT
, etc.public void printUsageDetails(PrintWriter writer, Syntax syntax, int format)
writer
- PrintWriter to which output should be generatedsyntax
- syntax for which to generate usage details messageformat
- desired output format TEXT
, etc.Copyright © 2016. All Rights Reserved.