Interface YangModuleInfo
-
- All Superinterfaces:
Immutable
,MutationBehaviour<Immutable>
- All Known Implementing Classes:
ResourceYangModuleInfo
@NonNullByDefault public interface YangModuleInfo extends Immutable
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 toYangModuleInfo
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Collection<YangModuleInfo>
getImportedModules()
ReturnYangModuleInfo
objects for all modules which are imported by this module.QName
getName()
Returns YANG module name, as a compositeQName
.default ByteSource
getYangTextByteSource()
Return aByteSource
accessing the YANG text of the module.default CharSource
getYangTextCharSource()
Return aCharSource
accessing the YANG text of the module.InputStream
openYangTextStream()
Return an open stream containing YANG text for this module.
-
-
-
Method Detail
-
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
InputStream openYangTextStream() throws IOException
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
default Collection<YangModuleInfo> 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
default ByteSource getYangTextByteSource()
Return aByteSource
accessing the YANG text of the module.- Returns:
- A ByteSource.
-
getYangTextCharSource
default CharSource getYangTextCharSource()
Return aCharSource
accessing the YANG text of the module.- Returns:
- A CharSource.
-
-