Class AbstractEffectiveUnknownSchmemaNode<A,D extends UnknownStatement<A>>
- java.lang.Object
-
- org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement<A,D>
-
- org.opendaylight.yangtools.yang.model.spi.meta.AbstractEffectiveUnknownSchmemaNode<A,D>
-
- All Implemented Interfaces:
AddedByUsesAware
,CopyableNode
,DocumentedNode
,DocumentedNode.WithStatus
,EffectiveStatementEquivalent<UnknownEffectiveStatement<?,?>>
,EffectiveStatement<A,D>
,ModelStatement<A>
,SchemaNode
,UnknownSchemaNode
,EffectiveStatementMixins.DocumentedNodeMixin<A,D>
@Beta public abstract class AbstractEffectiveUnknownSchmemaNode<A,D extends UnknownStatement<A>> extends AbstractDeclaredEffectiveStatement<A,D> implements EffectiveStatementMixins.DocumentedNodeMixin<A,D>, UnknownSchemaNode
A declaredAbstractDeclaredEffectiveStatement
withUnknownSchemaNode
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement
AbstractDeclaredEffectiveStatement.Default<A,D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultArgument<A,D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultWithArgument<A,D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultWithDataTree<A,D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultWithSchemaTree<A,D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.WithDataTree<A,D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.WithSchemaTree<A,D extends DeclaredStatement<A>>
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.spi.meta.EffectiveStatementMixins.DocumentedNodeMixin
EffectiveStatementMixins.DocumentedNodeMixin.WithStatus<A,D extends DeclaredStatement<A>>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEffectiveUnknownSchmemaNode(@NonNull D declared, A argument, CopyableNode history, @NonNull ImmutableList<? extends EffectiveStatement<?,?>> substatements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected MoreObjects.ToStringHelper
addToStringAttributes(MoreObjects.ToStringHelper helper)
<T> Collection<T>
allSubstatementsOfType(Class<T> type)
A
argument()
Returns statement argument.protected static @NonNull Map<QName,DataTreeEffectiveStatement<?>>
createDataTreeNamespace(Collection<SchemaTreeEffectiveStatement<?>> schemaTreeStatements, Map<QName,SchemaTreeEffectiveStatement<?>> schemaTreeNamespace)
protected static @NonNull Map<QName,SchemaTreeEffectiveStatement<?>>
createSchemaTreeNamespace(Collection<? extends EffectiveStatement<?,?>> substatements)
Create a Map containing the contents of the schema tree.protected static @NonNull HashMap<QName,TypedefEffectiveStatement>
createTypedefNamespace(Collection<? extends EffectiveStatement<?,?>> substatements)
ImmutableList<? extends EffectiveStatement<?,?>>
effectiveSubstatements()
Returns a collection of all effective substatements.boolean
equals(Object obj)
<K,V,N extends IdentifierNamespace<K,V>>
Optional<V>get(Class<N> namespace, K identifier)
Returns value associated with supplied identifier.<K,V,N extends IdentifierNamespace<K,V>>
Map<K,V>getAll(Class<N> namespace)
Returns all local values from supplied namespace.@NonNull D
getDeclared()
Returns statement, which was explicit declaration of this effective statement.protected <K,V,N extends IdentifierNamespace<K,V>>
Optional<? extends Map<K,V>>getNamespaceContents(@NonNull Class<N> namespace)
Return the statement-specific contents of specified namespace, if available.String
getNodeParameter()
Returns name of the unknown node.QName
getNodeType()
Returns QName instance with the name of the unknown node.Status
getStatus()
Returns status of the instance of the typeSchemaNode
.int
hashCode()
protected static <T extends SchemaTreeEffectiveStatement<?>>
@NonNull Map<QName,T>immutableNamespaceOf(Map<QName,T> map)
boolean
isAddedByUses()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isAugmenting()
Deprecated.protected static @NonNull Object
maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects.protected static @NonNull Object
maskSet(ImmutableSet<?> set)
String
toString()
protected static @NonNull ImmutableList<? extends @NonNull EffectiveStatement<?,?>>
unmaskList(@NonNull Object masked)
Utility method for recovering singleton lists squashed bymaskList(ImmutableList)
.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<T>
unmaskSet(@NonNull Object masked, @NonNull Class<T> type)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement
findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, get, getAll, statementOrigin, streamEffectiveSubstatements
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.EffectiveStatementEquivalent
asEffectiveStatement
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.spi.meta.EffectiveStatementMixins.DocumentedNodeMixin
getDescription, getReference, getUnknownSchemaNodes
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.ModelStatement
statementDefinition
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.SchemaNode
getQName
-
-
-
-
Constructor Detail
-
AbstractEffectiveUnknownSchmemaNode
protected AbstractEffectiveUnknownSchmemaNode(@NonNull D declared, A argument, CopyableNode history, @NonNull ImmutableList<? extends EffectiveStatement<?,?>> substatements)
-
-
Method Detail
-
argument
public final A argument()
Description copied from interface:ModelStatement
Returns statement argument.- Specified by:
argument
in interfaceModelStatement<A>
- Returns:
- statement argument.
-
getDeclared
public final @NonNull D getDeclared()
Description copied from interface:EffectiveStatement
Returns statement, which was explicit declaration of this effective statement.- Specified by:
getDeclared
in interfaceEffectiveStatement<A,D extends UnknownStatement<A>>
- Specified by:
getDeclared
in classAbstractDeclaredEffectiveStatement<A,D extends UnknownStatement<A>>
- Returns:
- statement, which was explicit declaration of this effective statement or null if statement was inferred from context.
-
effectiveSubstatements
public final ImmutableList<? extends EffectiveStatement<?,?>> effectiveSubstatements()
Description copied from interface:EffectiveStatement
Returns a collection of all effective substatements.- Specified by:
effectiveSubstatements
in interfaceEffectiveStatement<A,D extends UnknownStatement<A>>
- Returns:
- collection of all effective substatements.
-
getNodeType
public final QName getNodeType()
Description copied from interface:UnknownSchemaNode
Returns QName instance with the name of the unknown node. This corresponds toSchemaNode.getQName()
of theextension
statement which defined it.- Specified by:
getNodeType
in interfaceUnknownSchemaNode
- Returns:
- QName with name the name of the unknown node.
-
getNodeParameter
public final String getNodeParameter()
Description copied from interface:UnknownSchemaNode
Returns name of the unknown node.- Specified by:
getNodeParameter
in interfaceUnknownSchemaNode
- Returns:
- string with the name of unknown node.
-
isAddedByUses
@Deprecated(forRemoval=true) public final boolean isAddedByUses()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AddedByUsesAware
Returnstrue
if this node was added by uses statement, otherwise returnsfalse
.- Specified by:
isAddedByUses
in interfaceAddedByUsesAware
- Returns:
true
if this node was added by uses statement, otherwise returnsfalse
-
isAugmenting
@Deprecated public final boolean isAugmenting()
Deprecated.Description copied from interface:CopyableNode
Returnstrue
if this node was added by augmentation, otherwise returnsfalse
.- Specified by:
isAugmenting
in interfaceCopyableNode
- Returns:
true
if this node was added by augmentation, otherwise returnsfalse
-
allSubstatementsOfType
public final <T> Collection<T> allSubstatementsOfType(Class<T> type)
-
getStatus
public final Status getStatus()
Description copied from interface:DocumentedNode.WithStatus
Returns status of the instance of the typeSchemaNode
.- Specified by:
getStatus
in interfaceDocumentedNode.WithStatus
- Returns:
- status of this node which represents the argument of the YANG
status
substatement
-
get
public final <K,V,N extends IdentifierNamespace<K,V>> Optional<V> get(Class<N> namespace, K identifier)
Description copied from interface:EffectiveStatement
Returns value associated with supplied identifier.- Specified by:
get
in interfaceEffectiveStatement<A,D extends DeclaredStatement<A>>
- Type Parameters:
K
- Identifier typeV
- Value typeN
- Namespace identifier type- Parameters:
namespace
- Namespace typeidentifier
- Identifier of element.- Returns:
- Value if present
-
getAll
public final <K,V,N extends IdentifierNamespace<K,V>> Map<K,V> getAll(Class<N> namespace)
Description copied from interface:EffectiveStatement
Returns all local values from supplied namespace.- Specified by:
getAll
in interfaceEffectiveStatement<A,D extends DeclaredStatement<A>>
- Type Parameters:
K
- Identifier typeV
- Value typeN
- Namespace identifier type- Parameters:
namespace
- Namespace type- Returns:
- Key-value mappings, empty if the namespace does not exist.
-
getNamespaceContents
protected <K,V,N extends IdentifierNamespace<K,V>> Optional<? extends Map<K,V>> getNamespaceContents(@NonNull Class<N> namespace)
Return the statement-specific contents of specified namespace, if available.- Parameters:
namespace
- Requested namespace- Returns:
- Namespace contents, if available.
-
unmaskList
protected static final @NonNull ImmutableList<? extends @NonNull EffectiveStatement<?,?>> unmaskList(@NonNull Object masked)
Utility method for recovering singleton lists squashed bymaskList(ImmutableList)
.- Parameters:
masked
- list to unmask- Returns:
- Unmasked list
- Throws:
NullPointerException
- if masked is nullClassCastException
- if masked object does not match EffectiveStatement
-
createSchemaTreeNamespace
protected static @NonNull Map<QName,SchemaTreeEffectiveStatement<?>> createSchemaTreeNamespace(Collection<? extends EffectiveStatement<?,?>> substatements)
Create a Map containing the contents of the schema tree. Retur- Parameters:
substatements
- Substatements to index- Returns:
- Index of the schema tree as a mutable Map
- Throws:
NullPointerException
- ifsubstatements
is null
-
createDataTreeNamespace
protected static @NonNull Map<QName,DataTreeEffectiveStatement<?>> createDataTreeNamespace(Collection<SchemaTreeEffectiveStatement<?>> schemaTreeStatements, Map<QName,SchemaTreeEffectiveStatement<?>> schemaTreeNamespace)
-
immutableNamespaceOf
protected static <T extends SchemaTreeEffectiveStatement<?>> @NonNull Map<QName,T> immutableNamespaceOf(Map<QName,T> map)
-
createTypedefNamespace
protected static @NonNull HashMap<QName,TypedefEffectiveStatement> createTypedefNamespace(Collection<? extends EffectiveStatement<?,?>> substatements)
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper helper)
-
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<T> unmaskSet(@NonNull Object masked, @NonNull Class<T> type)
-
-