Interface DynamicTypeTransmission

All Superinterfaces:
org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.Resetable, org.refcodes.schema.Schemable, Serializable, Transmission
All Known Implementing Classes:
DynamicTypeSection, DynamicTypeSegment

public interface DynamicTypeTransmission extends Transmission
he DynamicTypeTransmission represents a Transmission which's internal raw data is created from provided types at runtime and which's internal raw data is used to create provided types at runtime. Therefore internally it just consists of a Sequence which is created if necessary from a provided type or from which a provided type is instantiated if necessary.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.LengthAccessor

    org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty

    Nested classes/interfaces inherited from interface org.refcodes.serial.Transmission

    Transmission.TransmissionMixin
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    fromType(T aValue)
    Constructs the DynamicTypeSection's Sequence from the given type's instance .
    <T> void
    fromType(T aValue, String... aAttributes)
    Constructs an instance for the given type T. .
    <T> T
    toType(Class<T> aType)
    Constructs an instance for the given type T.
    <T> T
    toType(Class<T> aType, String... aAttributes)
    Constructs an instance for the given type T. .

    Methods inherited from interface org.refcodes.serial.Transmission

    getLength, reset, toSchema, toSequence, toSimpleTypeMap, transmitTo, transmitTo, transmitTo
  • Method Details

    • toType

      <T> T toType(Class<T> aType)
      Constructs an instance for the given type T. The attributes of the given data structure are processed all and in alphabetical order. For specifying a predefined set of attributes and their order, please invoke fromType(Object, String...) instead!
      Type Parameters:
      T - The type of the data structure representing the body.
      Parameters:
      aType - The data structure's type.
      Returns:
      The according type constructed from the DynamicTypeSection's Sequence.
      Throws:
      IllegalArgumentException - thrown in case the DynamicTypeSection's Sequence does not match the provided type.
    • toType

      <T> T toType(Class<T> aType, String... aAttributes)
      Constructs an instance for the given type T. . The attributes of the given data structure are processed using the predefined set of attributes in their according order
      Type Parameters:
      T - The type of the data structure representing the body.
      Parameters:
      aType - The data structure's type.
      aAttributes - The attributes or null if all attributes are to be processed in alphabetical order.
      Returns:
      The according type constructed from the DynamicTypeSection's Sequence.
      Throws:
      IllegalArgumentException - thrown in case the DynamicTypeSection's Sequence does not match the provided type.
    • fromType

      <T> void fromType(T aValue)
      Constructs the DynamicTypeSection's Sequence from the given type's instance . The attributes of the given data structure are processed all and in alphabetical order. For specifying a predefined set of attributes and their order, please invoke fromType(Object, String[]) instead!
      Type Parameters:
      T - The type of the data structure representing the body.
      Parameters:
      aValue - The data structure's value.
    • fromType

      <T> void fromType(T aValue, String... aAttributes)
      Constructs an instance for the given type T. . The attributes of the given data structure are processed using the predefined set of attributes in their according order.
      Type Parameters:
      T - The type of the data structure representing the body.
      Parameters:
      aValue - The data structure's value.
      aAttributes - The attributes or null if all attributes are to be processed in alphabetical order.