Came across a design issue today where we really could have used Groovy's dynamic dispatch and multi-method support to invoke the proper method based on the interrogation of the runtime type of an object instance passed as a parameter to the method. This blog posting by MrHaki gives a great description of how Groovy solves this problem without the need of a double dispatch pattern implementation. We're writing our code in Java, so we don't get the Groovy goodness of dynamic method dispatch and multi-methods. We resorted to a double dispatch implementation to solve our problem. We did not use the instanceof operator and a whole bunch of conditionals.
Great and Useful Article.
ReplyDeleteJava Online Course
Java Online Training
Java EE training
Java Course in Chennai
Java Training in Chennai
Java Training Institutes in Chennai
Java Interview Questions
Java Interview Questions
Nice information Good Post,Looking for more blogs.
ReplyDeletePlease look here at
Vashikaran Astrologer in Rajarajeshwari Nagar
Lovely blog post,Thank you.
ReplyDeletevisit here
Sofa Refurbishing in Dasarahalli