Interface BindingDataContainerCodecTreeNode<T extends DataContainer>
- Type Parameters:
T
- DataContainer type
- All Superinterfaces:
BindingCodecTreeNode
,BindingDataObjectCodecTreeParent<Empty>
,BindingObjectCodecTreeNode
- All Known Subinterfaces:
BindingAugmentationCodecTreeNode<T>
,BindingChoiceCodecTreeNode<C>
,BindingDataObjectCodecTreeNode<T>
,BindingYangDataCodecTreeNode<T>
,CommonDataObjectCodecTreeNode<T>
- All Known Implementing Classes:
CommonDataObjectCodecContext
,DataObjectCodecContext
public non-sealed interface BindingDataContainerCodecTreeNode<T extends DataContainer>
extends BindingObjectCodecTreeNode, BindingDataObjectCodecTreeParent<Empty>
A
BindingObjectCodecTreeNode
which corresponds to a DataContainer
construct.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enumeration of possible addressability attribute of all children. -
Method Summary
Modifier and TypeMethodDescription@NonNull CommonDataObjectCodecTreeNode
<?> bindingPathArgumentChild
(@NonNull DataObjectStep<?> step, @Nullable List<YangInstanceIdentifier.PathArgument> builder) Returns nested node context using supplied DataObjectStep and adds YANG instance identifiers to the supplied list.Returns binding class of interface which represents API of current schema node.Return a summary of addressability of potential children.default <A extends Augmentation<?>>
@Nullable BindingAugmentationCodecTreeNode<A> streamAugmentation
(@NonNull Class<A> childClass) <E extends DataObject>
@Nullable BindingDataContainerCodecTreeNode<E> streamChild
(@NonNull Class<E> childClass) Returns child context as if it was walked byBindingStreamEventWriter
.default <E extends DataObject>
@Nullable BindingDataObjectCodecTreeNode<E> streamDataObject
(@NonNull Class<E> childClass) @NonNull BindingCodecTreeNode
yangPathArgumentChild
(@NonNull YangInstanceIdentifier.PathArgument child) Returns nested node context using suppliedYangInstanceIdentifier.PathArgument
.Methods inherited from interface org.opendaylight.yangtools.binding.data.codec.api.BindingCodecTreeNode
getSchema
Methods inherited from interface org.opendaylight.yangtools.binding.data.codec.api.BindingDataObjectCodecTreeParent
getStreamAugmentation, getStreamChild, getStreamDataObject
-
Method Details
-
getBindingClass
Returns binding class of interface which represents API of current schema node. The result is same as invokingBindingContract.implementedInterface()
on instance of data.- Specified by:
getBindingClass
in interfaceBindingObjectCodecTreeNode
- Returns:
- interface which defines API of binding representation of data.
-
streamChild
<E extends DataObject> @Nullable BindingDataContainerCodecTreeNode<E> streamChild(@NonNull Class<E> childClass) Returns child context as if it was walked byBindingStreamEventWriter
. This means that to enter case, one must issue getChild(ChoiceClass).getChild(CaseClass).This method differs from
BindingDataObjectCodecTreeParent.getStreamChild(Class)
, that is less strict for interfaces representing augmentation and cases, that may returnBindingCodecTreeNode
even if augmentation interface containing same data was supplied and does not represent augmentation of this node.- Parameters:
childClass
- Child class by Binding Stream navigation- Returns:
- Context of child or
null
is supplied class is not applicable in context. - Throws:
NullPointerException
- ifchildClass
isnull
-
streamAugmentation
default <A extends Augmentation<?>> @Nullable BindingAugmentationCodecTreeNode<A> streamAugmentation(@NonNull Class<A> childClass) -
streamDataObject
default <E extends DataObject> @Nullable BindingDataObjectCodecTreeNode<E> streamDataObject(@NonNull Class<E> childClass) -
yangPathArgumentChild
@NonNull BindingCodecTreeNode yangPathArgumentChild(@NonNull YangInstanceIdentifier.PathArgument child) Returns nested node context using suppliedYangInstanceIdentifier.PathArgument
.- Parameters:
child
- aYangInstanceIdentifier.PathArgument
- Returns:
- Context of child
- Throws:
IllegalArgumentException
- If supplied argument does not represent valid child.
-
bindingPathArgumentChild
@NonNull CommonDataObjectCodecTreeNode<?> bindingPathArgumentChild(@NonNull DataObjectStep<?> step, @Nullable List<YangInstanceIdentifier.PathArgument> builder) Returns nested node context using supplied DataObjectStep and adds YANG instance identifiers to the supplied list.- Parameters:
step
- ADataObjectStep
builder
- a mutable List to receiveYangInstanceIdentifier.PathArgument
s. Usenull
if such side-product is not needed.- Returns:
- A
CommonDataObjectCodecTreeNode
- Throws:
IllegalArgumentException
- if supplied argument does not represent valid child.
-
getChildAddressabilitySummary
@NonNull BindingDataContainerCodecTreeNode.ChildAddressabilitySummary getChildAddressabilitySummary()Return a summary of addressability of potential children. Binding specification does not allow all DOM tree elements to be directly addressed, which means some recursive tree operations, like data tree changes do not have a one-to-one mapping from DOM to binding in all cases. This method provides an optimization hint to guide translation of data structures, allowing for fast paths when all children are known to either be addressable or non-addressable.- Returns:
- Summary children addressability.
-