On 17 August 2011 13:58, Stephen Colebourne <scolebou...@joda.org> wrote:
> The Object encode(Object) approach is still valid if the primary use > case of the interface is for frameworks. In a framework, objects are > generally treated as of type Object, so the API is fine. User code > should use concrete versions. > In the case of ENC encode(DEC), the framework sees Object encode(Object), as this is the erased type. The framework is happy and Java code referring to the Encoder interface (directly or indirectly) is type-safe (baring casts which we can't do much about). Matthew > > Stephen > > -- Dr Matthew Pocock Visitor, School of Computing Science, Newcastle University mailto: turingatemyhams...@gmail.com gchat: turingatemyhams...@gmail.com msn: matthew_poc...@yahoo.co.uk irc.freenode.net: drdozer tel: (0191) 2566550 mob: +447535664143