The @Transformer annotation can also be added to methods that expect either the
Message type or the message payload type. The return value will be handled in the
exact same way as described above in the section describing the <transformer> element.
@Transformer
Order generateOrder(String productId) {
return new Order(productId);
}
Transformer methods may also accept the @Header and @Headers annotations that is documented in section Section B.5, “Annotation Support”
@Transformer Order generateOrder(String productId, @Header("customerName") String customer) { return new Order(productId, customer); }