org.apache.ivy.plugins.parser.xml

Class XmlModuleDescriptorParser

public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser

Parses an xml ivy file and output a ModuleDescriptor. For dependency and performance reasons, it uses only the SAX API, which makes the parsing code harder to understand.
Nested Class Summary
static classXmlModuleDescriptorParser.Parser
Constructor Summary
protected XmlModuleDescriptorParser()
Method Summary
booleanaccept(Resource res)
static XmlModuleDescriptorParsergetInstance()
protected XmlModuleDescriptorParser.ParsernewParser(ParserSettings ivySettings)
Instantiates a Parser instance responsible for actual parsing of Ivy files.
ModuleDescriptorparseDescriptor(ParserSettings ivySettings, URL xmlURL, Resource res, boolean validate)
voidtoIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md)
StringtoString()

Constructor Detail

XmlModuleDescriptorParser

protected XmlModuleDescriptorParser()

Method Detail

accept

public boolean accept(Resource res)

getInstance

public static XmlModuleDescriptorParser getInstance()

newParser

protected XmlModuleDescriptorParser.Parser newParser(ParserSettings ivySettings)
Instantiates a Parser instance responsible for actual parsing of Ivy files.

Override this method if you want to use a custom Parser.

Parameters: ivySettings the settings to use during parsing

Returns: the Parser instance used for parsing Ivy files

parseDescriptor

public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL xmlURL, Resource res, boolean validate)

Parameters: settings xmlURL the url pointing to the file to parse res the real resource to parse, used for log only validate

Returns:

Throws: ParseException IOException

toIvyFile

public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md)

toString

public String toString()