Class YangParserConfiguration.Builder
java.lang.Object
org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration.Builder
- All Implemented Interfaces:
Mutable
- Enclosing class:
- YangParserConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Return aYangParserConfigurationinitialized with contents of this builder.importResolutionMode(ImportResolutionMode newImportResolutionMode) retainDeclarationReferences(boolean newRetainDeclarationReferences) RetainDeclarationReferenceto source location in the final parser product.warnForUnkeyedLists(boolean newWarnForUnkeyedLists) Issue a warning when aliststatement without akeystatement is found in theconfig truepart of the schema tree.
-
Method Details
-
build
Return aYangParserConfigurationinitialized with contents of this builder.- Returns:
- A YangParserConfiguration
-
importResolutionMode
@Beta public YangParserConfiguration.Builder importResolutionMode(ImportResolutionMode newImportResolutionMode) -
retainDeclarationReferences
public YangParserConfiguration.Builder retainDeclarationReferences(boolean newRetainDeclarationReferences) RetainDeclarationReferenceto source location in the final parser product. This option results in quite significant memory overhead for storage ofDeclaredStatement, but makesDeclaredStatement.declarationReference()available, which is useful in certain scenarios, for example YANG editors.This option is disabled by default.
- Parameters:
newRetainDeclarationReferences-trueif declaration references should be retained- Returns:
- This builder
-
warnForUnkeyedLists
Issue a warning when aliststatement without akeystatement is found in theconfig truepart of the schema tree. Such statements run contrary to RFC7950, but are readily supported by OpenDaylight infrastructure.This option is enabled by default.
- Parameters:
newWarnForUnkeyedLists-trueif non-compliantliststatements should be reported- Returns:
- This builder
-