You're right. I was forgetting about java.lang.reflect.Method.invoke. But it is a PITA doing things that way, whereas C++ generic programming is designed for duck typing.
Cheers On Mon, Apr 22, 2013 at 08:16:01PM -0600, Joshua Thorp wrote: > You can do Duck typing in Java via methods requiring Objects (the base class > of all other Java objects) and using reflection to test for various > properties. But it is working against the grain of the language to do so. > Intersting run down of various implementations here: > http://en.wikipedia.org/wiki/Duck_typing > > --joshua -- ---------------------------------------------------------------------------- Prof Russell Standish Phone 0425 253119 (mobile) Principal, High Performance Coders Visiting Professor of Mathematics hpco...@hpcoders.com.au University of New South Wales http://www.hpcoders.com.au ---------------------------------------------------------------------------- ============================================================ FRIAM Applied Complexity Group listserv Meets Fridays 9a-11:30 at cafe at St. John's College to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com