java.lang.Object
org.jboss.modules.xml.ModuleXmlParser
A fast, validating
module.xml
parser.- Author:
- David M. Lloyd, thomas.diesler@jboss.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A factory for resource roots, based on a root path, loader path, and loader name. -
Method Summary
Modifier and TypeMethodDescriptionstatic XmlPullParserException
endOfDocument
(XmlPullParser reader) static ModuleSpec
parseModuleXml
(ModuleLoader moduleLoader, String moduleName, File root, File moduleInfoFile) Parse amodule.xml
file.static ModuleSpec
parseModuleXml
(ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier, File root, File moduleInfoFile) Deprecated.static ModuleSpec
parseModuleXml
(ModuleXmlParser.ResourceRootFactory factory, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, String moduleName) Parse amodule.xml
file.static ModuleSpec
parseModuleXml
(ModuleXmlParser.ResourceRootFactory factory, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) Deprecated.static ModuleSpec
parseModuleXml
(ModuleXmlParser.ResourceRootFactory factory, MavenResolver mavenResolver, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, String moduleName) Parse amodule.xml
file.static ModuleSpec
parseModuleXml
(ModuleXmlParser.ResourceRootFactory factory, MavenResolver mavenResolver, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) static ModuleSpec
parseModuleXml
(ModuleXmlParser.ResourceRootFactory factory, ModuleLoader moduleLoader, String moduleName, File root, File moduleInfoFile) Parse amodule.xml
file.static XmlPullParserException
unexpectedContent
(XmlPullParser reader)
-
Method Details
-
parseModuleXml
@Deprecated public static ModuleSpec parseModuleXml(ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier, File root, File moduleInfoFile) throws ModuleLoadException, IOException Deprecated.UseparseModuleXml(ModuleLoader, String, File, File)
instead.Parse amodule.xml
file.- Parameters:
moduleLoader
- the module loader to use for dependency specificationsmoduleIdentifier
- the module identifier of the module to loadroot
- the module path rootmoduleInfoFile
- theFile
of themodule.xml
content- Returns:
- a module specification
- Throws:
ModuleLoadException
- if a dependency could not be established or another error occursIOException
- if I/O fails
-
parseModuleXml
public static ModuleSpec parseModuleXml(ModuleLoader moduleLoader, String moduleName, File root, File moduleInfoFile) throws ModuleLoadException, IOException Parse amodule.xml
file.- Parameters:
moduleLoader
- the module loader to use for dependency specificationsmoduleName
- the name of the module to loadroot
- the module path rootmoduleInfoFile
- theFile
of themodule.xml
content- Returns:
- a module specification
- Throws:
ModuleLoadException
- if a dependency could not be established or another error occursIOException
- if I/O fails
-
parseModuleXml
public static ModuleSpec parseModuleXml(ModuleXmlParser.ResourceRootFactory factory, ModuleLoader moduleLoader, String moduleName, File root, File moduleInfoFile) throws ModuleLoadException, IOException Parse amodule.xml
file.- Parameters:
factory
- the resource root factory to use (must not benull
)moduleLoader
- the module loader to use for dependency specificationsmoduleName
- the name of the module to loadroot
- the module path rootmoduleInfoFile
- theFile
of themodule.xml
content- Returns:
- a module specification
- Throws:
ModuleLoadException
- if a dependency could not be established or another error occursIOException
- if I/O fails
-
parseModuleXml
@Deprecated public static ModuleSpec parseModuleXml(ModuleXmlParser.ResourceRootFactory factory, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) throws ModuleLoadException, IOException Deprecated.Parse amodule.xml
file.- Parameters:
factory
- the resource root factory to use (must not benull
)rootPath
- the root path to send in to the resource root factory (must not benull
)source
- a stream of themodule.xml
content (must not benull
)moduleInfoFile
- theFile
of themodule.xml
content (must not benull
)moduleLoader
- the module loader to use for dependency specifications (must not benull
)moduleIdentifier
- the module identifier of the module to load- Returns:
- a module specification
- Throws:
ModuleLoadException
- if a dependency could not be established or another error occursIOException
- if I/O fails
-
parseModuleXml
public static ModuleSpec parseModuleXml(ModuleXmlParser.ResourceRootFactory factory, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, String moduleName) throws ModuleLoadException, IOException Parse amodule.xml
file.- Parameters:
factory
- the resource root factory to use (must not benull
)rootPath
- the root path to send in to the resource root factory (must not benull
)source
- a stream of themodule.xml
content (must not benull
)moduleInfoFile
- theFile
of themodule.xml
content (must not benull
)moduleLoader
- the module loader to use for dependency specifications (must not benull
)moduleName
- the module name of the module to load- Returns:
- a module specification
- Throws:
ModuleLoadException
- if a dependency could not be established or another error occursIOException
- if I/O fails
-
parseModuleXml
@Deprecated public static ModuleSpec parseModuleXml(ModuleXmlParser.ResourceRootFactory factory, MavenResolver mavenResolver, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) throws ModuleLoadException, IOException Deprecated.Parse amodule.xml
file.- Parameters:
factory
- the resource root factory to use (must not benull
)mavenResolver
- the Maven artifact resolver to use (must not benull
)rootPath
- the root path to send in to the resource root factory (must not benull
)source
- a stream of themodule.xml
content (must not benull
)moduleInfoFile
- theFile
of themodule.xml
content (must not benull
)moduleLoader
- the module loader to use for dependency specifications (must not benull
)moduleIdentifier
- the module identifier of the module to load- Returns:
- a module specification
- Throws:
ModuleLoadException
- if a dependency could not be established or another error occursIOException
- if I/O fails
-
parseModuleXml
public static ModuleSpec parseModuleXml(ModuleXmlParser.ResourceRootFactory factory, MavenResolver mavenResolver, String rootPath, InputStream source, String moduleInfoFile, ModuleLoader moduleLoader, String moduleName) throws ModuleLoadException, IOException Parse amodule.xml
file.- Parameters:
factory
- the resource root factory to use (must not benull
)mavenResolver
- the Maven artifact resolver to use (must not benull
)rootPath
- the root path to send in to the resource root factory (must not benull
)source
- a stream of themodule.xml
content (must not benull
)moduleInfoFile
- theFile
of themodule.xml
content (must not benull
)moduleLoader
- the module loader to use for dependency specifications (must not benull
)moduleName
- the module name of the module to load- Returns:
- a module specification
- Throws:
ModuleLoadException
- if a dependency could not be established or another error occursIOException
- if I/O fails
-
unexpectedContent
-
endOfDocument
-
parseModuleXml(ModuleLoader, String, File, File)
instead.