Package com.martiansoftware.jsap.xml
Class JSAPConfig
- java.lang.Object
-
- com.martiansoftware.jsap.xml.JSAPConfig
-
public class JSAPConfig extends Object
Provides support for loading JSAP configurations at runtime via an xml file. You don't need to access this class directly; instead, use JSAP's constructors that support xml.- Author:
- Marty Lamb
- See Also:
JSAP(URL)
-
-
Constructor Summary
Constructors Constructor Description JSAPConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(com.martiansoftware.jsap.xml.ParameterConfig config)static voidconfigure(JSAP jsapToConfigure, URL jsapXML)Loads a JSAP configuration from the xml at the specified URL, and configures the specified JSAP object accordinglyStringgetHelp()StringgetUsage()Iteratorparameters()voidsetHelp(String help)voidsetUsage(String usage)
-
-
-
Method Detail
-
configure
public static void configure(JSAP jsapToConfigure, URL jsapXML) throws IOException, JSAPException
Loads a JSAP configuration from the xml at the specified URL, and configures the specified JSAP object accordingly- Parameters:
jsapToConfigure- the JSAP to configurejsapXML- the configuration- Throws:
IOException- if an I/O error occursJSAPException- if the configuration is not valid
-
getHelp
public String getHelp()
-
setHelp
public void setHelp(String help)
-
getUsage
public String getUsage()
-
setUsage
public void setUsage(String usage)
-
addParameter
public void addParameter(com.martiansoftware.jsap.xml.ParameterConfig config)
-
parameters
public Iterator parameters()
-
-