Class JSAPConfig

java.lang.Object
com.martiansoftware.jsap.xml.JSAPConfig

public class JSAPConfig
extends java.lang.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

    Modifier and Type Method Description
    void addParameter​(com.martiansoftware.jsap.xml.ParameterConfig config)  
    static void configure​(JSAP jsapToConfigure, java.net.URL jsapXML)
    Loads a JSAP configuration from the xml at the specified URL, and configures the specified JSAP object accordingly
    java.lang.String getHelp()  
    java.lang.String getUsage()  
    java.util.Iterator parameters()  
    void setHelp​(java.lang.String help)  
    void setUsage​(java.lang.String usage)  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JSAPConfig

      public JSAPConfig()
  • Method Details

    • configure

      public static void configure​(JSAP jsapToConfigure, java.net.URL jsapXML) throws java.io.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 configure
      jsapXML - the configuration
      Throws:
      java.io.IOException - if an I/O error occurs
      JSAPException - if the configuration is not valid
    • getHelp

      public java.lang.String getHelp()
    • setHelp

      public void setHelp​(java.lang.String help)
    • getUsage

      public java.lang.String getUsage()
    • setUsage

      public void setUsage​(java.lang.String usage)
    • addParameter

      public void addParameter​(com.martiansoftware.jsap.xml.ParameterConfig config)
    • parameters

      public java.util.Iterator parameters()