jodd.util
Class PrettyStringBuilder

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

public class PrettyStringBuilder
extends java.lang.Object

Constructs pretty string representation of object value.


Field Summary
protected  int deep
           
protected  int maxDeep
           
protected  int maxItemsToShow
           
protected  java.lang.String moreValue
           
protected  java.lang.String nullValue
           
 
Constructor Summary
PrettyStringBuilder()
           
 
Method Summary
 int getMaxDeep()
           
 int getMaxItemsToShow()
           
 java.lang.String getMoreValue()
           
 java.lang.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(java.lang.String moreValue)
          Sets string for 'more'.
 void setNullValue(java.lang.String nullValue)
          Sets null value representation.
static java.lang.String str(java.lang.Object value)
          Static version for quick access.
protected  java.lang.String toPrettyString(java.lang.Object obj)
          Returns pretty value from object value.
 java.lang.String toString(java.lang.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 java.lang.String nullValue

moreValue

protected java.lang.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 java.lang.String getNullValue()

setNullValue

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


getMoreValue

public java.lang.String getMoreValue()

setMoreValue

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


toPrettyString

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


toString

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


str

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



Copyright © 2003-2012 Jodd Team