Groovy Alternatives to Inner Classes Add comment to Wiki View in Wiki Edit Wiki page Printable Version

Obsolete

Icon

This page is obsolete, newer versions of Groovy have support for inner classes

 

Groovy 1.0 and 1.1 do not support normal Java inner classes (you can have such classes only in Scripts or you can code them in Java of course).

In many cases though, you don't need them. Here is a Groovy 1.1 example which shows you how to construct a class on the fly which implements several interfaces. This would be a prime example where you would typically use an inner class in Java. In Groovy we don't have to:

 

Search

Results of your search request can come from various sources: the Groovy website itself, the JIRA issues, the API documentation, as well as a few other interesting Groovy-related blogs.

  By  -  pages  -  views  - last modified