Interface DynamicTypeTransmission

  • All Superinterfaces:
    org.refcodes.mixin.LengthAccessor, 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.
    • Method Detail

      • toType

        <T> T toType​(Class<T> aType,
                     String... aAttributes)
              throws IllegalArgumentException
        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.