Interface BindingDataObjectCodecTreeParent<T>
- Type Parameters:
T
- Dummy parameter to work around problems with streamingChoiceIn
classes. Essentially we wantgetStreamChild(Class)
to also service such classes, which are notDataObject
s. The problem really is thatcase
interfaces are DataObjects and hence are an alluring target for that method. The workaround works with two sides:- Here the fact that we are generic means that binary compatibility dictates that our signature be backwards compatible with anyone who might have seen us as non-generic, i.e. in streamChild() taking a raw class (because there were no generics)
- Users pick it up from there: all they need to do is to go to raw types, then accepts any class, but from there we can just chain on method return, arriving into a type-safe world again
- All Known Subinterfaces:
BindingAugmentationCodecTreeNode<T>
,BindingChoiceCodecTreeNode<C>
,BindingCodecTree
,BindingDataContainerCodecTreeNode<T>
,BindingDataObjectCodecTreeNode<T>
,BindingDOMCodecServices
,BindingYangDataCodecTreeNode<T>
,CommonDataObjectCodecTreeNode<T>
- All Known Implementing Classes:
BindingCodecContext
,CommonDataObjectCodecContext
,DataObjectCodecContext
,DefaultBindingDOMCodecServices
,ForwardingBindingDOMCodecServices
,GlobalBindingDOMCodecServices
Common interface for entities which can supply a
BindingDataObjectCodecTreeNode
based on Binding DataObject
class instance.-
Method Summary
Modifier and TypeMethodDescriptiondefault <A extends Augmentation<?>>
@NonNull BindingAugmentationCodecTreeNode<A> getStreamAugmentation
(@NonNull Class<A> childClass) <E extends DataObject>
@NonNull BindingDataContainerCodecTreeNode<E> getStreamChild
(@NonNull Class<E> childClass) Returns child context as if it was walked byBindingStreamEventWriter
.default <E extends DataObject>
@NonNull BindingDataObjectCodecTreeNode<E> getStreamDataObject
(@NonNull Class<E> childClass)
-
Method Details
-
getStreamChild
<E extends DataObject> @NonNull BindingDataContainerCodecTreeNode<E> getStreamChild(@NonNull Class<E> childClass) Returns child context as if it was walked byBindingStreamEventWriter
. This means that to enter case, one must issuegetStreamChild(ChoiceClass).getStreamChild(CaseClass)
.- Type Parameters:
E
- Stream child DataObject type- Parameters:
childClass
- Child class by Binding Stream navigation- Returns:
- Context of child
- Throws:
NullPointerException
- ifchildClass
isnull
IllegalArgumentException
- If supplied child class is not valid in specified context.
-
getStreamAugmentation
default <A extends Augmentation<?>> @NonNull BindingAugmentationCodecTreeNode<A> getStreamAugmentation(@NonNull Class<A> childClass) -
getStreamDataObject
default <E extends DataObject> @NonNull BindingDataObjectCodecTreeNode<E> getStreamDataObject(@NonNull Class<E> childClass)
-