-
- All Superinterfaces:
org.refcodes.mixin.LengthAccessor
,Serializable
,Transmission
- All Known Implementing Classes:
DynamicTypeSection
,DynamicTypeSegment
public interface DynamicTypeTransmission extends Transmission
heDynamicTypeTransmission
represents aTransmission
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 aSequence
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> void
fromType(T aValue)
Constructs theDynamicTypeSection
'sSequence
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, toSchema, toSequence, toSimpleTypeMap, transmitTo, transmitTo, transmitTo
-
-
-
-
Method Detail
-
toType
<T> T toType(Class<T> aType) throws IllegalArgumentException
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 invokefromType(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
'sSequence
. - Throws:
IllegalArgumentException
- thrown in case theDynamicTypeSection
'sSequence
does not match the provided type.
-
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
'sSequence
. - Throws:
IllegalArgumentException
- thrown in case theDynamicTypeSection
'sSequence
does not match the provided type.
-
fromType
<T> void fromType(T aValue)
Constructs theDynamicTypeSection
'sSequence
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 invokefromType(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.
-
-