Quick prototyping in Groovy with “Convert Map to Class” intention

Sometimes it is helpful to use a Map for fast prototyping of classes with some properties but without any logic. But in the end it would be nice to have a real class. In IntelliJ IDEA you can get it by invoking “Convert Map to Class” intention on a map.

You only need to type a name and a package for a new class:

And you’ll get something like this…

and a UserInfo class:

Quick and easy, right?

It is not something new, it’s been in IntelliJ IDEA for a while already. We just felt you might not be aware of it.

This entry was posted in Tips & Tricks and tagged , . Bookmark the permalink.

One Response to Quick prototyping in Groovy with “Convert Map to Class” intention

  1. Martin says:

    thats really nice, is the same intention available for actionscript code?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">