public class AndroidManifestParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
AndroidManifestParser.ManifestErrorHandler |
Constructor and Description |
---|
AndroidManifestParser() |
Modifier and Type | Method and Description |
---|---|
static ManifestData |
parse(com.android.io.IAbstractFile manifestFile)
Parses the Android Manifest, and returns an object containing the result of the parsing.
|
static ManifestData |
parse(com.android.io.IAbstractFile manifestFile,
boolean gatherData,
AndroidManifestParser.ManifestErrorHandler errorHandler)
Parses the Android Manifest, and returns a
ManifestData object containing the result
of the parsing. |
static ManifestData |
parse(com.android.io.IAbstractFolder projectFolder) |
static ManifestData |
parse(java.io.InputStream manifestFileStream)
Parses the Android Manifest from an
InputStream , and returns a ManifestData
object containing the result of the parsing. |
public static ManifestData parse(com.android.io.IAbstractFile manifestFile, boolean gatherData, AndroidManifestParser.ManifestErrorHandler errorHandler) throws java.io.IOException, org.xml.sax.SAXException
ManifestData
object containing the result
of the parsing.manifestFile
- the IAbstractFile
representing the manifest file.gatherData
- indicates whether the parsing will extract data from the manifest. If false
the method will always return null.errorHandler
- an optional errorHandler.java.io.IOException
- If there was a problem parsing the fileorg.xml.sax.SAXException
- If any SAX errors occurred during processing.public static ManifestData parse(com.android.io.IAbstractFile manifestFile) throws java.io.IOException, org.xml.sax.SAXException
This is the equivalent of calling parse(manifestFile, true, null)
.
manifestFile
- the manifest file to parse.java.io.IOException
org.xml.sax.SAXException
public static ManifestData parse(com.android.io.IAbstractFolder projectFolder) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public static ManifestData parse(java.io.InputStream manifestFileStream) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
InputStream
, and returns a ManifestData
object containing the result of the parsing.manifestFileStream
- the InputStream
representing the manifest file.java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException