org.apache.ivy.plugins.parser.xml
Class XmlModuleDescriptorParser
java.lang.Object
org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser
org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser
- All Implemented Interfaces:
- ModuleDescriptorParser
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.
- Author:
- x.hanin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getInstance
public static XmlModuleDescriptorParser getInstance()
parseDescriptor
public ModuleDescriptor parseDescriptor(IvySettings ivySettings,
java.net.URL xmlURL,
Resource res,
boolean validate)
throws java.text.ParseException,
java.io.IOException
- Parameters:
ivy
- xmlURL
- the url pointing to the file to parseres
- the real resource to parse, used for log onlyvalidate
-
- Returns:
-
- Throws:
java.text.ParseException
java.io.IOException
accept
public boolean accept(Resource res)
toIvyFile
public void toIvyFile(java.io.InputStream is,
Resource res,
java.io.File destFile,
ModuleDescriptor md)
throws java.io.IOException,
java.text.ParseException
- Description copied from interface:
ModuleDescriptorParser
- Convert a module descriptor to an ivy file.
This method MUST close the given input stream when job is finished
- Parameters:
is
- input stream with opened on original module descriptor resource
- Throws:
java.io.IOException
java.text.ParseException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object