Interface NamespaceStmtCtx
- All Superinterfaces:
CommonStmtCtx
- All Known Subinterfaces:
EffectiveStmtCtx.Current<A,
,D> EffectiveStmtCtx.UndeclaredCurrent<A,
,D> RootStmtContext<A,
,D, E> RootStmtContext.Mutable<A,
,D, E> StmtContext<A,
,D, E> StmtContext.Mutable<A,
D, E>
Support work with namespace content.
-
Method Summary
Modifier and TypeMethodDescription<K,
V> @Nullable Map<K, V> localNamespacePortion
(@NonNull ParserNamespace<K, V> namespace) Return the portion of specified namespace stored in this node.<K,
V> @Nullable Map<K, V> namespace
(@NonNull ParserNamespace<K, V> namespace) Return the selected namespace.<K,
V> @Nullable V namespaceItem
(@NonNull ParserNamespace<K, V> namespace, K key) Return a value associated with specified key within a namespace.Methods inherited from interface org.opendaylight.yangtools.yang.parser.spi.meta.CommonStmtCtx
getRawArgument, producesDeclared, producesEffective, publicDefinition, rawArgument, sourceReference
-
Method Details
-
namespace
Return the selected namespace.- Type Parameters:
K
- namespace key typeV
- namespace value type- Parameters:
namespace
- namespace- Returns:
- Namespace contents, if available
-
namespaceItem
Return a value associated with specified key within a namespace.- Type Parameters:
K
- namespace key typeV
- namespace value type- Parameters:
namespace
- Namespacekey
- Key- Returns:
- Value, or
null
if there is no element - Throws:
NamespaceNotAvailableException
- when the namespace is not available.
-
localNamespacePortion
Return the portion of specified namespace stored in this node. Depending on namespace behaviour this may or may not represent the complete contents of the namespace as available vianamespace(ParserNamespace)
.This partial view is useful when the need is not to perform a proper namespace lookup, but rather act on current statement's contribution to the namespace.
- Type Parameters:
K
- namespace key typeV
- namespace value type- Parameters:
namespace
- namespace type class- Returns:
- Namespace portion stored in this node, if available
-