Top Description Inners Fields Constructors Methods
org.kohsuke.args4j

public Class Config

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .List, org.kohsuke.args4j.spi.ConfigElement, org.xml.sax.Attributes, .InputSource, .SAXException, .XMLReader, org.xml.sax.helpers.DefaultHandler, .XMLReaderFactory

Metadataconfiguration. This class holds all metadata for a class, mainly a list of @Options and @Arguments.
Author
Jan Materne

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
Config.ConfigHandler

SAX-Handler for reading the configuration file.

Field Summary

Modifier and TypeField and Description
public List<ConfigElement>
arguments

All @Arguments.

public List<ConfigElement>
options

All @Options.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Config

Returns:

The parsed configuration.
parse
(InputSource
source of the xml data
xml
)

Parses a XML file and returns a Config object holding the information.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argumentsback to summary
public List<ConfigElement> arguments

All @Arguments.

optionsback to summary
public List<ConfigElement> options

All @Options.

Constructor Detail

Configback to summary
public Config()

Method Detail

parseback to summary
public static Config parse(InputSource xml) throws IOException, SAXException

Parses a XML file and returns a Config object holding the information.

Parameters
xml:InputSource

source of the xml data

Returns:Config

The parsed configuration.

org.kohsuke.args4j back to summary

public Class Config.ConfigHandler

extends DefaultHandler
Class Inheritance

SAX-Handler for reading the configuration file.
Author
Jan Materne

Field Summary

Modifier and TypeField and Description
pack-priv Config
pack-priv ConfigElement

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
startElement(String
The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
uri
,
String
The local name (without prefix), or the empty string if Namespace processing is not being performed.
localName
,
String
The qualified name (with prefix), or the empty string if qualified names are not available.
qName
,
Attributes
The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
attributes
)

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the start of an element.

Inherited from org.xml.sax.helpers.DefaultHandler:
charactersendDocumentendElementendPrefixMappingerrorfatalErrorignorableWhitespacenotationDeclprocessingInstructionresolveEntitysetDocumentLocatorskippedEntitystartDocumentstartPrefixMappingunparsedEntityDeclwarning

Field Detail

configback to summary
pack-priv Config config
currentCEback to summary
pack-priv ConfigElement currentCE

Constructor Detail

ConfigHandlerback to summary
public ConfigHandler(Config config)

Method Detail

startElementback to summary
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.helpers.DefaultHandler.startElement.

Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

Parameters
uri:String

The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.

localName:String

The local name (without prefix), or the empty string if Namespace processing is not being performed.

qName:String

The qualified name (with prefix), or the empty string if qualified names are not available.

attributes:Attributes

The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.

Annotations
@Override
Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.