Refactored generation of anonymous inner clases using square javawriter