public interface CoderTranslator<T extends Coder<?>>
This interface is incomplete. Coders must in the general case have the capability to encode an additional payload, which is not currently supported. This exists as a temporary measure.
Modifier and Type | Method and Description |
---|---|
T |
fromComponents(java.util.List<Coder<?>> components,
byte[] payload,
CoderTranslation.TranslationContext context)
|
java.util.List<? extends Coder<?>> |
getComponents(T from)
Extract all component
coders within a coder. |
default byte[] |
getPayload(T from)
Returns the serialized payload that will be provided when deserializing this coder, if any.
|
java.util.List<? extends Coder<?>> getComponents(T from)
coders
within a coder.default byte[] getPayload(T from)
The default implementation returns a byte array of length zero.
T fromComponents(java.util.List<Coder<?>> components, byte[] payload, CoderTranslation.TranslationContext context)