On Tue, Sep 14, 2010 at 4:58 PM, Olivier.Roger <olivier.ro...@bsb.com> wrote: > > hello Camel! > > Is it possible to use generics in annotated converters ? > > I tried to do this > > �...@converter > public <T> T toPayload(Message<T> msg){ > return msg.getPayload(); > } > > Which does not work. However, replacing <T> by a real class definition is > working for that type. > I would like to avoid to create one converter for each type of payload my > messages can have, is that possible ? >
Use the @FallbackConverter http://camel.apache.org/type-converter.html > Thanks in advance, > > Olivier > -- > View this message in context: > http://camel.465427.n5.nabble.com/Converter-Generics-tp2839250p2839250.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus