Interface BindingDataObjectCodecTreeParent<T>

Type Parameters:
T - Dummy parameter to work around problems with streaming ChoiceIn classes. Essentially we want streamChild(Class) to also service such classes, which are not DataObjects. The problem really is that case 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

@Beta public interface BindingDataObjectCodecTreeParent<T>
Common interface for entities which can supply a BindingDataObjectCodecTreeNode based on Binding DataObject class instance.
  • Method Details

    • streamChild

      <E extends DataObject> @NonNull BindingDataObjectCodecTreeNode<E> streamChild(@NonNull Class<E> childClass)
      Returns child context as if it was walked by BindingStreamEventWriter. This means that to enter case, one must issue streamChild(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.