org.apache.struts2.interceptor.debugging
Class ObjectToHTMLWriter

java.lang.Object
  extended by org.apache.struts2.interceptor.debugging.ObjectToHTMLWriter

 class ObjectToHTMLWriter
extends Object

Writes an object as a table, where each field can be expanded if it is an Object/Collection/Array


Field Summary
private  PrettyPrintWriter prettyWriter
           
 
Constructor Summary
ObjectToHTMLWriter(Writer writer)
           
 
Method Summary
private  boolean isEmptyCollection(Object value)
          Some collections might throw an exception when isEmpty() is called
private  boolean isEmptyMap(Object value)
          Some maps, like AttributeMap will throw an exception when isEmpty() is called
 void write(ReflectionProvider reflectionProvider, Object root, String expr)
           
private  void writeProperty(String name, Object value, String expr)
           
private  void writeValue(String name, Object value, String expr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prettyWriter

private PrettyPrintWriter prettyWriter
Constructor Detail

ObjectToHTMLWriter

ObjectToHTMLWriter(Writer writer)
Method Detail

write

public void write(ReflectionProvider reflectionProvider,
                  Object root,
                  String expr)
           throws IntrospectionException,
                  ReflectionException
Throws:
IntrospectionException
ReflectionException

writeProperty

private void writeProperty(String name,
                           Object value,
                           String expr)

isEmptyMap

private boolean isEmptyMap(Object value)
Some maps, like AttributeMap will throw an exception when isEmpty() is called


isEmptyCollection

private boolean isEmptyCollection(Object value)
Some collections might throw an exception when isEmpty() is called


writeValue

private void writeValue(String name,
                        Object value,
                        String expr)


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.