Class AbstractSchemaEffectiveDocumentedNode<A,D extends DeclaredStatement<A>>
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveStatement<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementBase<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNodeWithoutStatus<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNode<A,D>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractSchemaEffectiveDocumentedNode<A,D>
-
- Type Parameters:
A
- Argument type (Void
if statement does not have argument.)D
- Class representing declared version of this statement.
- All Implemented Interfaces:
DocumentedNode
,DocumentedNode.WithStatus
,EffectiveStatement<A,D>
,ModelStatement<A>
- Direct Known Subclasses:
AbstractEffectiveDocumentedDataNodeContainer
,AbstractEffectiveModule
,AbstractEffectiveSchemaNode
,UnknownEffectiveStatementBase
@Beta public abstract class AbstractSchemaEffectiveDocumentedNode<A,D extends DeclaredStatement<A>> extends AbstractEffectiveDocumentedNode<A,D>
AnAbstractEffectiveDocumentedNode
which can optionally supportSchemaTreeAwareEffectiveStatement
.- Author:
- Robert Varga
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSchemaEffectiveDocumentedNode(StmtContext<A,D,?> ctx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> @NonNull ImmutableSet<T>
derivedSet(VarHandle vh, @NonNull Class<T> clazz)
protected Optional<DataSchemaNode>
findDataSchemaNode(QName name)
Indexing support forDataNodeContainer.findDataChildByName(QName)
.protected <K,V,N extends IdentifierNamespace<K,V>>
Optional<? extends Map<K,V>>getNamespaceContents(Class<N> namespace)
Return the statement-specific contents of specified namespace, if available.protected static @NonNull Object
maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects.protected static <T> @NonNull ImmutableList<T>
unmaskList(@NonNull Object masked, @NonNull Class<T> type)
Utility method for recovering singleton lists squashed bymaskList(ImmutableList)
.-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNode
getStatus, getUnknownSchemaNodes
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveDocumentedNodeWithoutStatus
getDescription, getReference, nullableDescription, nullableReference
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase
argument, getDeclared, getStatementSource, statementDefinition
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementBase
allSubstatementsOfType, effectiveSubstatements, firstEffectiveSubstatementOfType, firstSchemaNode, firstSubstatementOfType, firstSubstatementOfType, initSubstatements
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveStatement
get, getAll, unmaskList
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
getDescription, getReference
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement
findAll, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, streamEffectiveSubstatements
-
-
-
-
Constructor Detail
-
AbstractSchemaEffectiveDocumentedNode
protected AbstractSchemaEffectiveDocumentedNode(StmtContext<A,D,?> ctx)
-
-
Method Detail
-
getNamespaceContents
protected <K,V,N extends IdentifierNamespace<K,V>> Optional<? extends Map<K,V>> getNamespaceContents(Class<N> namespace)
Description copied from class:AbstractEffectiveStatement
Return the statement-specific contents of specified namespace, if available.- Overrides:
getNamespaceContents
in classAbstractEffectiveStatement<A,D extends DeclaredStatement<A>>
- Parameters:
namespace
- Requested namespace- Returns:
- Namespace contents, if available.
-
derivedSet
protected final <T> @NonNull ImmutableSet<T> derivedSet(VarHandle vh, @NonNull Class<T> clazz)
-
findDataSchemaNode
protected final Optional<DataSchemaNode> findDataSchemaNode(QName name)
Indexing support forDataNodeContainer.findDataChildByName(QName)
.
-
maskList
protected static final @NonNull Object maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects. This is a CPU/mem trade-off, which we are usually willing to make: for the cost of an instanceof check we can save one object and re-create it when needed. The inverse operation is #unmaskSubstatements(Object)}.- Parameters:
list
- list to mask- Returns:
- Masked list
- Throws:
NullPointerException
- if list is null
-
unmaskList
protected static final <T> @NonNull ImmutableList<T> unmaskList(@NonNull Object masked, @NonNull Class<T> type)
Utility method for recovering singleton lists squashed bymaskList(ImmutableList)
.- Parameters:
masked
- list to unmask- Returns:
- Unmasked list
- Throws:
NullPointerException
- if any argument is nullClassCastException
- if masked object does not match expected class
-
-