Class AbstractDeclaredEffectiveRootStatement<D extends DeclaredStatement<UnqualifiedQName>>
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement<A>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement.WithRawArgument<A>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement.WithArgument<A>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement.WithArgument.WithSubstatements<UnqualifiedQName>
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredEffectiveRootStatement<D>
-
- All Implemented Interfaces:
DeclaredStatement<UnqualifiedQName>
,ModelStatement<UnqualifiedQName>
,BodyDeclaredStatement
,DataDefinitionAwareDeclaredStatement<UnqualifiedQName>
,DataDefinitionAwareDeclaredStatement.WithReusableDefinitions<UnqualifiedQName>
,DocumentedDeclaredStatement<UnqualifiedQName>
,LinkageDeclaredStatement
,MetaDeclaredStatement<UnqualifiedQName>
,NotificationStatementAwareDeclaredStatement<UnqualifiedQName>
,RevisionAwareDeclaredStatement
@Beta public abstract class AbstractDeclaredEffectiveRootStatement<D extends DeclaredStatement<UnqualifiedQName>> extends AbstractDeclaredStatement.WithArgument.WithSubstatements<UnqualifiedQName> implements LinkageDeclaredStatement, MetaDeclaredStatement<UnqualifiedQName>, RevisionAwareDeclaredStatement, BodyDeclaredStatement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement.WithArgument
AbstractDeclaredStatement.WithArgument.WithSubstatements<A>
-
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement
AbstractDeclaredStatement.ArgumentToString<A>, AbstractDeclaredStatement.WithArgument<A>, AbstractDeclaredStatement.WithoutArgument, AbstractDeclaredStatement.WithQNameArgument, AbstractDeclaredStatement.WithRawArgument<A>, AbstractDeclaredStatement.WithRawStringArgument
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.DataDefinitionAwareDeclaredStatement
DataDefinitionAwareDeclaredStatement.WithReusableDefinitions<A>
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.DocumentedDeclaredStatement
DocumentedDeclaredStatement.WithStatus<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDeclaredEffectiveRootStatement(StmtContext<UnqualifiedQName,?,?> ctx, ImmutableList<? extends DeclaredStatement<?>> substatements)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static @NonNull Object
maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects.protected static @NonNull Object
maskSet(ImmutableSet<?> set)
protected static <T> @NonNull ImmutableList<T>
unmaskList(@NonNull Object masked, @NonNull Class<T> type)
Utility method for recovering singleton lists squashed bymaskList(ImmutableList)
.protected static <T> @NonNull ImmutableSet<? extends T>
unmaskSet(@NonNull Object masked, @NonNull Class<T> type)
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement.WithArgument.WithSubstatements
declaredSubstatements
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement.WithArgument
argument
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement.WithRawArgument
rawArgument
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredStatement
getStatementSource, 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.stmt.BodyDeclaredStatement
getAugments, getDeviations, getExtensions, getFeatures, getIdentities, getRpcs
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.DataDefinitionAwareDeclaredStatement
getDataDefinitions
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.DataDefinitionAwareDeclaredStatement.WithReusableDefinitions
getGroupings, getTypedefs
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement
declaredSubstatements, declaredSubstatements, findFirstDeclaredSubstatement, findFirstDeclaredSubstatementArgument, rawArgument, streamDeclaredSubstatements
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.DocumentedDeclaredStatement
getDescription, getReference
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.LinkageDeclaredStatement
getImports, getIncludes
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.MetaDeclaredStatement
getContact, getOrganization
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.ModelStatement
argument, getStatementSource, statementDefinition
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.NotificationStatementAwareDeclaredStatement
getNotifications
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.stmt.RevisionAwareDeclaredStatement
getRevisions
-
-
-
-
Constructor Detail
-
AbstractDeclaredEffectiveRootStatement
protected AbstractDeclaredEffectiveRootStatement(StmtContext<UnqualifiedQName,?,?> ctx, ImmutableList<? extends DeclaredStatement<?>> substatements)
-
-
Method Detail
-
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
-
maskSet
protected static final @NonNull Object maskSet(ImmutableSet<?> set)
-
unmaskSet
protected static final <T> @NonNull ImmutableSet<? extends T> unmaskSet(@NonNull Object masked, @NonNull Class<T> type)
-
-