jodd.util
Class PrettyStringBuilder

java.lang.Object
  extended by jodd.util.PrettyStringBuilder

public class PrettyStringBuilder
extends Object

Constructs pretty string representation of object value.


Field Summary
protected  int deep
           
protected  int maxDeep
           
protected  int maxItemsToShow
           
protected  String moreValue
           
protected  String nullValue
           
 
Constructor Summary
PrettyStringBuilder()
           
 
Method Summary
 int getMaxDeep()
           
 int getMaxItemsToShow()
           
 String getMoreValue()
           
 String getNullValue()
           
 void setMaxDeep(int maxDeep)
          Sets how deep to examine inner objects.
 void setMaxItemsToShow(int maxItemsToShow)
          Sets the max number of items of arrays, collections and maps to show.
 void setMoreValue(String moreValue)
          Sets string for 'more'.
 void setNullValue(String nullValue)
          Sets null value representation.
static String str(Object value)
          Static version for quick access.
protected  String toPrettyString(Object obj)
          Returns pretty value from object value.
 String toString(Object value)
          Returns pretty string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxItemsToShow

protected int maxItemsToShow

maxDeep

protected int maxDeep

deep

protected int deep

nullValue

protected String nullValue

moreValue

protected String moreValue
Constructor Detail

PrettyStringBuilder

public PrettyStringBuilder()
Method Detail

getMaxItemsToShow

public int getMaxItemsToShow()

setMaxItemsToShow

public void setMaxItemsToShow(int maxItemsToShow)
Sets the max number of items of arrays, collections and maps to show.


getMaxDeep

public int getMaxDeep()

setMaxDeep

public void setMaxDeep(int maxDeep)
Sets how deep to examine inner objects.


getNullValue

public String getNullValue()

setNullValue

public void setNullValue(String nullValue)
Sets null value representation.


getMoreValue

public String getMoreValue()

setMoreValue

public void setMoreValue(String moreValue)
Sets string for 'more'.


toPrettyString

protected String toPrettyString(Object obj)
Returns pretty value from object value.


toString

public String toString(Object value)
Returns pretty string representation of the object.


str

public static String str(Object value)
Static version for quick access.