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

Posted on by Maxim Medvedev

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.

Comments below can no longer be edited.

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

  1. Martin says:

    April 19, 2011

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

Subscribe

Subscribe for updates