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


You need to login to view comments.