Class ASTSchemaSource
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.AbstractIdentifiable<SourceIdentifier>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.repo.ASTSchemaSource
-
- All Implemented Interfaces:
Identifiable<SourceIdentifier>
,Immutable
,MutationBehaviour<Immutable>
,SchemaSourceRepresentation
@Beta public final class ASTSchemaSource extends AbstractIdentifiable<SourceIdentifier> implements SchemaSourceRepresentation
Abstract Syntax Tree representation of a schema source. This representation is internal to the YANG parser implementation, as it relies on ANTLR types.Instances of this representation are used for caching purposes, as they are a natural intermediate step in YANG text processing pipeline: the text has been successfully parsed, so we know it is syntactically correct. It also passes basic semantic validation and we were able to extract dependency information.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull org.antlr.v4.runtime.ParserRuleContext
getAST()
Return the underlying abstract syntax tree.@NonNull YangModelDependencyInfo
getDependencyInformation()
Return the dependency information as extracted from the AST.@NonNull SemVerSourceIdentifier
getSemVerIdentifier()
Optional<String>
getSymbolicName()
Return the symbolic name, if available.Class<? extends SchemaSourceRepresentation>
getType()
Return the concrete representation type.-
Methods inherited from class org.opendaylight.yangtools.concepts.AbstractIdentifiable
addToStringAttributes, getIdentifier, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation
getIdentifier
-
-
-
-
Method Detail
-
getSymbolicName
public Optional<String> getSymbolicName()
Description copied from interface:SchemaSourceRepresentation
Return the symbolic name, if available. This name has no semantic meaning beyond being useful for debugging by humans.- Specified by:
getSymbolicName
in interfaceSchemaSourceRepresentation
- Returns:
- Symbolic name, if available
-
getSemVerIdentifier
public @NonNull SemVerSourceIdentifier getSemVerIdentifier()
-
getType
public Class<? extends SchemaSourceRepresentation> getType()
Description copied from interface:SchemaSourceRepresentation
Return the concrete representation type.- Specified by:
getType
in interfaceSchemaSourceRepresentation
- Returns:
- The type of representation.
-
getAST
public @NonNull org.antlr.v4.runtime.ParserRuleContext getAST()
Return the underlying abstract syntax tree.- Returns:
- Underlying AST.
-
getDependencyInformation
public @NonNull YangModelDependencyInfo getDependencyInformation()
Return the dependency information as extracted from the AST.- Returns:
- Dependency information.
-
-