, Extension without inheritance, Part 1

See how Groovy, Scala, and Clojure bolt behavior onto classes

From the developerWorks archives

Neal Ford

Date archived: May 13, 2019 | 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 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 content, steps, or illustrations may have changed.

Zone=Java development, Open source
ArticleID=933633 Extension without inheritance, Part 1