Class YangParserConfiguration.Builder
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration.Builder
-
- All Implemented Interfaces:
Mutable
,MutationBehaviour<Mutable>
- Enclosing class:
- YangParserConfiguration
public static final class YangParserConfiguration.Builder extends Object implements Mutable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description YangParserConfiguration
build()
Return aYangParserConfiguration
initialized with contents of this builder.YangParserConfiguration.Builder
importResolutionMode(ImportResolutionMode newImportResolutionMode)
YangParserConfiguration.Builder
retainDeclarationReferences(boolean newRetainDeclarationReferences)
RetainDeclarationReference
to source location in the final parser product.YangParserConfiguration.Builder
warnForUnkeyedLists(boolean newWarnForUnkeyedLists)
Issue a warning when alist
statement without akey
statement is found in theconfig true
part of the schema tree.
-
-
-
Method Detail
-
build
public YangParserConfiguration build()
Return aYangParserConfiguration
initialized with contents of this builder.- Returns:
- A YangParserConfiguration
-
importResolutionMode
@Beta public YangParserConfiguration.Builder importResolutionMode(ImportResolutionMode newImportResolutionMode)
-
retainDeclarationReferences
public YangParserConfiguration.Builder retainDeclarationReferences(boolean newRetainDeclarationReferences)
RetainDeclarationReference
to 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
-true
if declaration references should be retained- Returns:
- This builder
-
warnForUnkeyedLists
public YangParserConfiguration.Builder warnForUnkeyedLists(boolean newWarnForUnkeyedLists)
Issue a warning when alist
statement without akey
statement is found in theconfig true
part 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
-true
if non-compliantlist
statements should be reported- Returns:
- This builder
-
-