Interface YangModuleInfo
- All Superinterfaces:
Immutable
- All Known Implementing Classes:
ResourceYangModuleInfo
Information and model capture for Binding V1. Instances of this class identify a packaged model and allow access
to its YANG text. They also contain references to
YangModuleInfo
instances as observed at code generation
time.
The purpose of this class is to ensure package resolution order in OSGi environments, as implementations of this interface are required to be co-located with generated code. When this module relies on some imports, that dependency is expressed across jars via an implementation requirement to reference YangModuleInfos.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection
<YangModuleInfo> ReturnYangModuleInfo
objects for all modules which are imported by this module.getName()
Returns YANG module name, as a compositeQName
.default ByteSource
Return aByteSource
accessing the YANG text of the module.default CharSource
Return aCharSource
accessing the YANG text of the module.Return an open stream containing YANG text for this module.
-
Method Details
-
getName
QName getName()Returns YANG module name, as a compositeQName
. Module's namespace and revision maps toQName.getModule()
and module name maps toAbstractQName.getLocalName()
.- Returns:
- YANG module name.
-
openYangTextStream
Return an open stream containing YANG text for this module. The stream is required to be UTF-8 encoded.- Returns:
- An open stream.
- Throws:
IOException
- If the stream cannot be opened.
-
getImportedModules
ReturnYangModuleInfo
objects for all modules which are imported by this module. Default implementation returns an empty list.- Returns:
YangModuleInfo
objects of all imported modules.
-
getYangTextByteSource
Return aByteSource
accessing the YANG text of the module.- Returns:
- A ByteSource.
-
getYangTextCharSource
Return aCharSource
accessing the YANG text of the module.- Returns:
- A CharSource.
-