A
- Argument type (Void
if statement does not have argument.)D
- Class representing declared version of this statement.@Beta public abstract class AbstractDeclaredEffectiveStatement<A,D extends DeclaredStatement<A>> extends AbstractEffectiveStatement<A,D>
DeclaredStatement
. This
is notably not true for all case
statements, some of which may actually be implied.
Note implementations are not strictly required to make the declared statement available, they are free to throw
UnsupportedOperationException
from getDeclared()
, rendering any services relying on declared
statement to be not available.
Constructor and Description |
---|
AbstractDeclaredEffectiveStatement() |
Modifier and Type | Method and Description |
---|---|
abstract D |
getDeclared()
Returns statement, which was explicit declaration of this effective
statement.
|
StatementSource |
getStatementSource()
Returns statement source, which denotes if statement was
explicitly declared in original model or inferred during
semantic processing of model.
|
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 by
maskList(ImmutableList) . |
effectiveSubstatements, get, getAll, getNamespaceContents, unmaskList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findAll, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, streamEffectiveSubstatements
argument, statementDefinition
public final StatementSource getStatementSource()
ModelStatement
public abstract D getDeclared()
EffectiveStatement
protected static final @NonNull Object maskList(ImmutableList<?> list)
list
- list to maskNullPointerException
- if list is nullprotected static final <T> @NonNull ImmutableList<T> unmaskList(@NonNull Object masked, @NonNull Class<T> type)
maskList(ImmutableList)
.masked
- list to unmaskNullPointerException
- if any argument is nullClassCastException
- if masked object does not match expected classCopyright © 2020 OpenDaylight. All rights reserved.