@Beta public final class ASTSchemaSource extends Object implements SchemaSourceRepresentation
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Function<ASTSchemaSource,org.antlr.v4.runtime.ParserRuleContext> |
GET_AST
Deprecated.
|
static com.google.common.base.Function<ASTSchemaSource,YangModelDependencyInfo> |
GET_DEPINFO
Deprecated.
|
static com.google.common.base.Function<ASTSchemaSource,SourceIdentifier> |
GET_IDENTIFIER
Deprecated.
|
static com.google.common.base.Function<ASTSchemaSource,SourceIdentifier> |
GET_SEMVER_IDENTIFIER
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static ASTSchemaSource |
create(SourceIdentifier identifier,
org.antlr.v4.runtime.ParserRuleContext tree)
Create a new instance of AST representation for a abstract syntax tree, performing minimal semantic analysis
to acquire dependency information.
|
static ASTSchemaSource |
create(SourceIdentifier identifier,
org.antlr.v4.runtime.ParserRuleContext tree,
String text)
Deprecated.
Use
create(SourceIdentifier, ParserRuleContext) instead. |
static ASTSchemaSource |
create(String name,
org.antlr.v4.runtime.ParserRuleContext tree)
Create a new instance of AST representation for a abstract syntax tree,
performing minimal semantic analysis to acquire dependency information.
|
static ASTSchemaSource |
create(String symbolicName,
SourceIdentifier identifier,
org.antlr.v4.runtime.ParserRuleContext tree)
Create a new instance of AST representation for a abstract syntax tree, performing minimal semantic analysis
to acquire dependency information.
|
org.antlr.v4.runtime.ParserRuleContext |
getAST()
Return the underlying abstract syntax tree.
|
YangModelDependencyInfo |
getDependencyInformation()
Return the dependency information as extracted from the AST.
|
SourceIdentifier |
getIdentifier()
Return this objects Identifier
|
SemVerSourceIdentifier |
getSemVerIdentifier() |
Optional<String> |
getSymbolicName()
Return the symbolic name, if available.
|
Class<? extends SchemaSourceRepresentation> |
getType()
Return the concrete representation type.
|
@Deprecated public static final com.google.common.base.Function<ASTSchemaSource,SourceIdentifier> GET_IDENTIFIER
@Deprecated public static final com.google.common.base.Function<ASTSchemaSource,SourceIdentifier> GET_SEMVER_IDENTIFIER
@Deprecated public static final com.google.common.base.Function<ASTSchemaSource,YangModelDependencyInfo> GET_DEPINFO
@Deprecated public static final com.google.common.base.Function<ASTSchemaSource,org.antlr.v4.runtime.ParserRuleContext> GET_AST
public static ASTSchemaSource create(@Nonnull String name, @Nonnull org.antlr.v4.runtime.ParserRuleContext tree) throws YangSyntaxErrorException
name
- YANG source name. Used only for error reporting.tree
- ANTLR abstract syntax treeYangSyntaxErrorException
- if we fail to extract dependency information.@Deprecated public static ASTSchemaSource create(@Nonnull SourceIdentifier identifier, @Nonnull org.antlr.v4.runtime.ParserRuleContext tree, String text) throws YangSyntaxErrorException
create(SourceIdentifier, ParserRuleContext)
instead.identifier
- SourceIdentifier of yang schema source.tree
- ANTLR abstract syntax treetext
- YANG text sourceYangSyntaxErrorException
- if we fail to extract dependency information.public static ASTSchemaSource create(@Nonnull SourceIdentifier identifier, @Nonnull org.antlr.v4.runtime.ParserRuleContext tree) throws YangSyntaxErrorException
identifier
- SourceIdentifier of yang schema source.tree
- ANTLR abstract syntax treeYangSyntaxErrorException
- if we fail to extract dependency information.public static ASTSchemaSource create(@Nonnull String symbolicName, @Nonnull SourceIdentifier identifier, @Nonnull org.antlr.v4.runtime.ParserRuleContext tree) throws YangSyntaxErrorException
symbolicName
- Symbolic nameidentifier
- SourceIdentifier of yang schema source.tree
- ANTLR abstract syntax treeYangSyntaxErrorException
- if we fail to extract dependency information.public SourceIdentifier getIdentifier()
SchemaSourceRepresentation
getIdentifier
in interface Identifiable<SourceIdentifier>
getIdentifier
in interface SchemaSourceRepresentation
public Optional<String> getSymbolicName()
SchemaSourceRepresentation
getSymbolicName
in interface SchemaSourceRepresentation
public SemVerSourceIdentifier getSemVerIdentifier()
@Nonnull public Class<? extends SchemaSourceRepresentation> getType()
SchemaSourceRepresentation
getType
in interface SchemaSourceRepresentation
@Nonnull public org.antlr.v4.runtime.ParserRuleContext getAST()
@Nonnull public YangModelDependencyInfo getDependencyInformation()
Copyright © 2018 OpenDaylight. All rights reserved.