public class ConfigMeta extends Object
A number of the setter methods return this object, to facilitate declarations where method invocations are chained so that the configured metadata object can be returned in a single expression rather than multiple statements (cf StringBuffer).
Constructor and Description |
---|
ConfigMeta(String shortName,
String longName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ConfigMeta |
appendXmlDescription(String[] moreXml)
Convenience method to add additional lines to the existing XML
documentation string.
|
static String |
capitalise(String word)
Uppercases the first letter of a string.
|
String |
getLongName()
Returns a potentially more descriptive name suitable for use in a GUI.
|
String |
getShortDescription()
Returns a short description string.
|
String |
getShortName()
Returns the basic one-word name, not case-sensitive, for use in
command-line interfaces.
|
String |
getStringUsage()
Returns a usage string which should some clue how to specify this
key from a string.
|
String |
getXmlDescription()
Returns an XML string suitable for insertion into a user document.
|
ConfigMeta |
setShortDescription(String shortDescription)
Sets a short description string.
|
ConfigMeta |
setStringUsage(String usage)
Sets a usage string which should give some clue how to specify this
key from a string.
|
ConfigMeta |
setXmlDescription(String xmlDescription)
Sets a documentation string.
|
ConfigMeta |
setXmlDescription(String[] lines)
Convenience method to set the XML description from an array of text
lines.
|
public String getShortName()
public String getLongName()
public String getStringUsage()
Examples might be something like "true|false
"
or "<RRGGBB>
".
public String getShortDescription()
public String getXmlDescription()
public ConfigMeta setStringUsage(String usage)
Examples might be something like "true|false
"
or "<RRGGBB>
".
usage
- usage stringpublic ConfigMeta setShortDescription(String shortDescription)
shortDescription
- one-line descriptionpublic ConfigMeta setXmlDescription(String xmlDescription)
Permissible elements include p, ul, li, dl, dt, dd, em, code, strong. Lists go inside paragraphs.
xmlDescription
- documentation stringpublic ConfigMeta setXmlDescription(String[] lines)
setXmlDescription
is called on the result of joining the lines with newline characters.lines
- lines of documentation stringpublic ConfigMeta appendXmlDescription(String[] moreXml)
moreXml
- additinoal lines of documentation stringCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.