Class EffectiveStatementBase<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>
-
- Type Parameters:
A
- Argument type (Void
if statement does not have argument.)D
- Class representing declared version of this statement.
- All Implemented Interfaces:
EffectiveStatement<A,D>
,ModelStatement<A>
- Direct Known Subclasses:
DeclaredEffectiveStatementBase
,UndeclaredEffectiveStatementBase
public abstract class EffectiveStatementBase<A,D extends DeclaredStatement<A>> extends AbstractEffectiveStatement<A,D>
Stateful version ofAbstractEffectiveStatement
, which holds substatements in anImmutableList
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EffectiveStatementBase(StmtContext<A,D,?> ctx)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Collection<T>
allSubstatementsOfType(Class<T> type)
Collection<? extends EffectiveStatement<?,?>>
effectiveSubstatements()
Returns a collection of all effective substatements.protected EffectiveStatement<?,?>
firstEffectiveSubstatementOfType(Class<?> type)
protected <S extends SchemaNode>
SfirstSchemaNode(Class<S> type)
protected <R> R
firstSubstatementOfType(Class<?> type, Class<R> returnType)
protected <T> @Nullable T
firstSubstatementOfType(Class<T> type)
protected Collection<? extends EffectiveStatement<?,?>>
initSubstatements(Collection<? extends StmtContext<?,?,?>> substatementsInit)
Create a set of substatements.protected Collection<? extends EffectiveStatement<?,?>>
initSubstatements(StmtContext<A,D,?> ctx, Collection<? extends StmtContext<?,?,?>> substatementsInit)
-
Methods inherited from class org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractEffectiveStatement
get, getAll, getNamespaceContents
-
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.meta.EffectiveStatement
findAll, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, getDeclared, streamEffectiveSubstatements
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.ModelStatement
argument, getStatementSource, statementDefinition
-
-
-
-
Constructor Detail
-
EffectiveStatementBase
protected EffectiveStatementBase(StmtContext<A,D,?> ctx)
Constructor.- Parameters:
ctx
- context of statement.
-
-
Method Detail
-
initSubstatements
@Beta protected Collection<? extends EffectiveStatement<?,?>> initSubstatements(StmtContext<A,D,?> ctx, Collection<? extends StmtContext<?,?,?>> substatementsInit)
-
initSubstatements
protected Collection<? extends EffectiveStatement<?,?>> initSubstatements(Collection<? extends StmtContext<?,?,?>> substatementsInit)
Create a set of substatements. This method is split out so it can be overridden in ExtensionEffectiveStatementImpl to leak a not-fully-initialized instance.- Parameters:
substatementsInit
- proposed substatements- Returns:
- Filtered substatements
-
effectiveSubstatements
public final Collection<? extends EffectiveStatement<?,?>> effectiveSubstatements()
Description copied from interface:EffectiveStatement
Returns a collection of all effective substatements.- Returns:
- collection of all effective substatements.
-
allSubstatementsOfType
public final <T> Collection<T> allSubstatementsOfType(Class<T> type)
-
firstSubstatementOfType
protected final <T> @Nullable T firstSubstatementOfType(Class<T> type)
-
firstSubstatementOfType
protected final <R> R firstSubstatementOfType(Class<?> type, Class<R> returnType)
-
firstEffectiveSubstatementOfType
protected final EffectiveStatement<?,?> firstEffectiveSubstatementOfType(Class<?> type)
-
firstSchemaNode
protected final <S extends SchemaNode> S firstSchemaNode(Class<S> type)
-
-