Java Magazine, Mar/Apr 2018
ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 67 jvm languages piled bytecodes In this case the generated code returns the fully qualified class name followed by the values of the attributes from the top down wrapped in parentheses Person pk new Person first Paul last King assert pk toString Person Paul King Note Paul King is one of the Groovy core team members as well as one of the lead coauthors of the book on Groovy 2 x Groovy in Action To see some of the details load the POGO into the Groovy Console which comes with the Groovy SDK as Ive done in Figure 1 Under the Script menu of the Groovy Console there is an entry called Inspect AST This opens the Groovy AST Browser which shows the generated nodes in the tree some of which are shown in Figure 2 Figure 1 Code that will be converted into ASTs in Figure 2
You must have JavaScript enabled to view digital editions.