public class OptionDescriptions extends java.lang.Object
/appdata/options.xml
, but also
from a plugin option description file (always with the name plugin.xml
).Constructor and Description |
---|
OptionDescriptions()
Creates the Option Descriptions
|
Modifier and Type | Method and Description |
---|---|
void |
generateMaps()
Creates several option maps for fast access to individual options.
|
Option |
getOption(java.lang.String optionflag)
Returns an option based on the option flag
|
Option |
getOption(java.lang.String optiongroup,
java.lang.String optionname)
Returns an option based on the option name and/or the option group name
|
protected java.util.Collection<Option> |
getOptionGroupList(java.lang.String groupname)
Returns a collection of option that are member of an option group
|
java.util.TreeSet<java.lang.String> |
getOptionGroupNameSet()
Return a sorted set of option group names
|
java.util.Set<Option> |
getSaveOptionSet()
Returns a set of option that are marked as SAVEOPTION
|
boolean |
hasOptions() |
void |
parseOptionDescriptionXMLfile(java.net.URL url)
Parse a XML file that contains the options used for controlling the application.
|
java.lang.String |
toString() |
java.lang.String |
toStringMaps()
Returns a string representation that contains printable information of several options maps
|
java.lang.String |
toStringOptionGroup(java.lang.String groupname)
Returns a string representation of a option group without the option group name in the string.
|
public OptionDescriptions()
public Option getOption(java.lang.String optiongroup, java.lang.String optionname) throws MaltChainedException
optiongroup
- the name of the option groupoptionname
- the option nameMaltChainedException
public Option getOption(java.lang.String optionflag) throws MaltChainedException
optionflag
- the option flagMaltChainedException
public java.util.Set<Option> getSaveOptionSet()
public java.util.TreeSet<java.lang.String> getOptionGroupNameSet()
protected java.util.Collection<Option> getOptionGroupList(java.lang.String groupname)
groupname
- the name of the option grouppublic void parseOptionDescriptionXMLfile(java.net.URL url) throws MaltChainedException
url
- The path to a XML file that explains the options used in the application.OptionException
MaltChainedException
public boolean hasOptions()
public void generateMaps() throws MaltChainedException
OptionException
MaltChainedException
public java.lang.String toStringMaps()
public java.lang.String toStringOptionGroup(java.lang.String groupname)
groupname
- The option group namepublic java.lang.String toString()
toString
in class java.lang.Object
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.