Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
hacking the mainframe

Mark Watson markwatson

💻
hacking the mainframe
View GitHub Profile
@markwatson
markwatson / toString Generator
Created Feb 9, 2016 — forked from jenslohmann/toString Generator
Java toString() generator for IntelliJ IDEA that generates JSON
View toString Generator
public java.lang.String toString() {
#if ( $members.size() > 0 )
#set ( $i = 0 )
return "{\"_class\":\"$classname\", " +
#foreach( $member in $members )
#set ( $i = $i + 1 )
#if ( $i == $members.size() )
#set ( $postfix = "+" )
#else
#set ( $postfix = "+ "", "" + " )