var_dump in Groovy


/ Published in: Groovy
Save to your folder(s)

ReflectionToStringBuilder wraps a class and outputs a string describing its attributes, more or less similar to var_dump in PHP


Copy this code and paste it in your HTML
  1. import org.apache.commons.lang.builder.ReflectionToStringBuilder
  2.  
  3. variable= new ComplexObject()
  4. println new ReflectionToStringBuilder( variable).toString()

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.