Java.next, Extension without inheritance, Part 1
See how Groovy, Scala, and Clojure bolt behavior onto classes
From the developerWorks archives
Date archived: December 19, 2016 | First published: June 12, 2013
Groovy, Scala, and Clojure offer many extension mechanisms, whereas inheritance is virtually the Java™ language's only option. This installment looks at category classes, the
ExpandoMetaClass, implicit casts, and protocols as ways to extend Java classes with the Java.next languages.
This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some steps and illustrations may have changed.