public abstract class YangModelDependencyInfo extends Object
YangModelDependencyInfo.ModuleDependencyInfo
- Dependency information for moduleYangModelDependencyInfo.SubmoduleDependencyInfo
- Dependency information for submoduleModifier and Type | Class and Description |
---|---|
static class |
YangModelDependencyInfo.ModuleDependencyInfo
Dependency information for YANG module.
|
static class |
YangModelDependencyInfo.SubmoduleDependencyInfo
Dependency information for submodule, also provides name for parent
module.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static YangModelDependencyInfo |
fromAST(String name,
org.antlr.v4.runtime.ParserRuleContext tree)
Extracts
YangModelDependencyInfo from an abstract syntax tree of
a YANG model. |
static YangModelDependencyInfo |
fromInputStream(InputStream yangStream)
Extracts
YangModelDependencyInfo from input stream containing
YANG model. |
com.google.common.collect.ImmutableSet<ModuleImport> |
getDependencies()
Returns immutable collection of all module imports.
|
String |
getFormattedRevision()
Returns formatted revision string
|
static String |
getLatestRevision(YangStatementParser.StatementContext module,
String sourceName) |
String |
getName()
Returns model name
|
com.google.common.base.Optional<SemVer> |
getSemanticVersion()
Returns semantic version of module
|
int |
hashCode() |
public com.google.common.collect.ImmutableSet<ModuleImport> getDependencies()
import
statements and
include
statements for submodules.public String getName()
public String getFormattedRevision()
public com.google.common.base.Optional<SemVer> getSemanticVersion()
public static YangModelDependencyInfo fromAST(String name, org.antlr.v4.runtime.ParserRuleContext tree) throws YangSyntaxErrorException
YangModelDependencyInfo
from an abstract syntax tree of
a YANG model.tree
- Abstract syntax treeYangModelDependencyInfo
YangSyntaxErrorException
- If the AST is not a valid YANG module/submodulepublic static YangModelDependencyInfo fromInputStream(InputStream yangStream)
YangModelDependencyInfo
from input stream containing
YANG model.
This parsing does not validate full YANG module, only parses header up to
the revisions and imports.yangStream
- Opened Input stream containing text source of YANG modelYangModelDependencyInfo
IllegalArgumentException
- If input stream is not valid YANG streampublic static String getLatestRevision(YangStatementParser.StatementContext module, String sourceName)
Copyright © 2018 OpenDaylight. All rights reserved.