Interface BindingDataObjectCodecTreeParent<T>
- Type Parameters:
T
- Dummy parameter to work around problems with streamingChoiceIn
classes. Essentially we wantstreamChild(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:
BindingCodecTree
,BindingDataObjectCodecTreeNode<T>
,BindingDOMCodecServices
- All Known Implementing Classes:
BindingCodecContext
,CurrentAdapterSerializer
,DataObjectCodecContext
,DefaultBindingDOMCodecServices
,ForwardingBindingDOMCodecServices
,GlobalBindingDOMCodecServices
Common interface for entities which can supply a
BindingDataObjectCodecTreeNode
based on Binding DataObject
class instance.-
Method Summary
Modifier and TypeMethodDescription<E extends DataObject>
@NonNull BindingDataObjectCodecTreeNode<E>streamChild
(@NonNull Class<E> childClass) Returns child context as if it was walked byBindingStreamEventWriter
.
-
Method Details
-
streamChild
<E extends DataObject> @NonNull BindingDataObjectCodecTreeNode<E> streamChild(@NonNull Class<E> childClass) Returns child context as if it was walked byBindingStreamEventWriter
. This means that to enter case, one must issuestreamChild(ChoiceClass).streamChild(CaseClass)
.- Type Parameters:
E
- Stream child DataObject type- Parameters:
childClass
- Child class by Binding Stream navigation- Returns:
- Context of child
- Throws:
IllegalArgumentException
- If supplied child class is not valid in specified context.
-