|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.lang.builder.ToStringStyle
ToStringStyle
works with ToStringBuilder to create a
toString. The main public interface is always via ToStringBuilder.
These classes are intended to be used as singletons. There is no need
to instantiate a new style each time. A program will generally use one
of the predefined constants on this class. Alternatively, the
StandardToStringStyle
class can be used to set the individual
settings. Thus most styles can be achieved without subclassing.
If required, a subclass can override as many or as few of the methods as it requires.Each object type (from boolean to long to Object to int[]) has its own methods to output it. Most have two versions, detail and summary. For example, the detail version of the array based methods will output the whole array, whereas the summary method will just output the array length.
Nested Class Summary | |
private static class |
ToStringStyle.DefaultToStringStyle
Default ToStringStyle. |
private static class |
ToStringStyle.MultiLineToStringStyle
ToStringStyle that outputs on multiple lines. |
private static class |
ToStringStyle.NoFieldNameToStringStyle
ToStringStyle that does not print out the field names. |
private static class |
ToStringStyle.SimpleToStringStyle
ToStringStyle that does not print out the classname, identity hashcode, content start or field name. |
Field Summary | |
private boolean |
arrayContentDetail
The detail for array content |
private String |
arrayEnd
The array end '}' |
private String |
arraySeparator
The array separator ',' |
private String |
arrayStart
The array start '{' |
private String |
contentEnd
The content end ']' |
private String |
contentStart
The content start '[' |
static ToStringStyle |
DEFAULT_STYLE
The default toString style. |
private boolean |
defaultFullDetail
The value to use when fullDetail is null 'true' |
private String |
fieldNameValueSeparator
The field name value separator '=' |
private String |
fieldSeparator
The field separator ',' |
static ToStringStyle |
MULTI_LINE_STYLE
The multi line toString style. |
static ToStringStyle |
NO_FIELD_NAMES_STYLE
The no field names toString style. |
private String |
nullText
The null text ' |
static ToStringStyle |
SIMPLE_STYLE
The simple toString style. |
private String |
sizeEndText
The summary size text start '>' |
private String |
sizeStartText
The summary size text start ' |
private String |
summaryObjectEndText
The summary object text start '>' |
private String |
summaryObjectStartText
The summary object text start '<' |
private boolean |
useClassName
Whether to use the class name 'true' |
private boolean |
useFieldNames
Whether to use the field names 'true' |
private boolean |
useIdentityHashCode
Whether to use the identity hash code 'true' |
private boolean |
useShortClassName
Whether to use short class names 'false' |
Constructor Summary | |
protected |
ToStringStyle()
Constructor. |
Method Summary | |
void |
append(StringBuffer buffer,
String fieldName,
boolean value)
Append to the toString a boolean value. |
void |
append(StringBuffer buffer,
String fieldName,
boolean[] array,
Boolean fullDetail)
Append to the toString a boolean array. |
void |
append(StringBuffer buffer,
String fieldName,
byte value)
Append to the toString a byte value. |
void |
append(StringBuffer buffer,
String fieldName,
byte[] array,
Boolean fullDetail)
Append to the toString a byte array. |
void |
append(StringBuffer buffer,
String fieldName,
char value)
Append to the toString a char value. |
void |
append(StringBuffer buffer,
String fieldName,
char[] array,
Boolean fullDetail)
Append to the toString a char array. |
void |
append(StringBuffer buffer,
String fieldName,
double value)
Append to the toString a double value. |
void |
append(StringBuffer buffer,
String fieldName,
double[] array,
Boolean fullDetail)
Append to the toString a double array. |
void |
append(StringBuffer buffer,
String fieldName,
float value)
Append to the toString a float value. |
void |
append(StringBuffer buffer,
String fieldName,
float[] array,
Boolean fullDetail)
Append to the toString a float array. |
void |
append(StringBuffer buffer,
String fieldName,
int value)
Append to the toString an int value. |
void |
append(StringBuffer buffer,
String fieldName,
int[] array,
Boolean fullDetail)
Append to the toString an int array. |
void |
append(StringBuffer buffer,
String fieldName,
long value)
Append to the toString a long value. |
void |
append(StringBuffer buffer,
String fieldName,
long[] array,
Boolean fullDetail)
Append to the toString a long array. |
void |
append(StringBuffer buffer,
String fieldName,
Object[] array,
Boolean fullDetail)
Append to the toString an Object array. |
void |
append(StringBuffer buffer,
String fieldName,
Object value,
Boolean fullDetail)
Append to the toString an Object value, printing the full toString of the object passed in. |
void |
append(StringBuffer buffer,
String fieldName,
short value)
Append to the toString a short value. |
void |
append(StringBuffer buffer,
String fieldName,
short[] array,
Boolean fullDetail)
Append to the toString a short array. |
protected void |
appendClassName(StringBuffer buffer,
Object object)
Append the class name. |
protected void |
appendContentEnd(StringBuffer buffer)
Append the content end to the buffer. |
protected void |
appendContentStart(StringBuffer buffer)
Append the content start to the buffer. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
boolean value)
Append to the toString a boolean value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
boolean[] array)
Append to the toString the detail of a boolean array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
byte value)
Append to the toString a byte value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
byte[] array)
Append to the toString the detail of a byte array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
char value)
Append to the toString a char value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
char[] array)
Append to the toString the detail of a char array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
Collection coll)
Append to the toString a Collection. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
double value)
Append to the toString a double value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
double[] array)
Append to the toString the detail of a double array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
float value)
Append to the toString a float value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
float[] array)
Append to the toString the detail of a float array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
int value)
Append to the toString an int value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
int[] array)
Append to the toString the detail of an int array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
long value)
Append to the toString a long value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
long[] array)
Append to the toString the detail of a long array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
Map map)
Append to the toString a Map. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
Object value)
Append to the toString an Object value, printing the full detail of the object. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
Object[] array)
Append to the toString the detail of an Object array. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
short value)
Append to the toString a short value. |
protected void |
appendDetail(StringBuffer buffer,
String fieldName,
short[] array)
Append to the toString the detail of a short array. |
void |
appendEnd(StringBuffer buffer,
Object object)
Append the end of data indicator. |
protected void |
appendFieldEnd(StringBuffer buffer,
String fieldName)
Append the field end to the buffer. |
protected void |
appendFieldSeparator(StringBuffer buffer)
Append the field separator to the buffer. |
protected void |
appendFieldStart(StringBuffer buffer,
String fieldName)
Append the field start to the buffer. |
protected void |
appendIdentityHashCode(StringBuffer buffer,
Object object)
Append the IdentityHashCode. |
protected void |
appendInternal(StringBuffer buffer,
String fieldName,
Object value,
boolean detail)
Append to the toString an Object, correctly interpretting its type. |
protected void |
appendNullText(StringBuffer buffer,
String fieldName)
Append an indicator for null to the buffer. |
void |
appendStart(StringBuffer buffer,
Object object)
Append the start of data indicator. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
boolean[] array)
Append to the toString a summary of a boolean array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
byte[] array)
Append to the toString a summary of a byte array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
char[] array)
Append to the toString a summary of a char array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
double[] array)
Append to the toString a summary of a double array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
float[] array)
Append to the toString a summary of a float array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
int[] array)
Append to the toString a summary of an int array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
long[] array)
Append to the toString a summary of a long array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
Object value)
Append to the toString an Object value, printing a summary of the object. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
Object[] array)
Append to the toString a summary of an Object array. |
protected void |
appendSummary(StringBuffer buffer,
String fieldName,
short[] array)
Append to the toString a summary of a short array. |
protected void |
appendSummarySize(StringBuffer buffer,
String fieldName,
int size)
Append to the toString a size summary. |
protected String |
getArrayEnd()
Gets the array end text. |
protected String |
getArraySeparator()
Gets the array separator text. |
protected String |
getArrayStart()
Gets the array start text. |
protected String |
getContentEnd()
Gets the content end text. |
protected String |
getContentStart()
Gets the content start text. |
protected String |
getFieldNameValueSeparator()
Gets the field name value separator text. |
protected String |
getFieldSeparator()
Gets the field separator text. |
protected String |
getNullText()
Gets the text to output when null found. |
protected String |
getShortClassName(Class cls)
Gets the short class name for a class. |
protected String |
getSizeEndText()
Gets the text to output when a Collection, Map or Array size is output. |
protected String |
getSizeStartText()
Gets the text to output when a Collection, Map or Array size is output. |
protected String |
getSummaryObjectEndText()
Gets the text to output when an Object is output in summary mode. |
protected String |
getSummaryObjectStartText()
Gets the text to output when an Object is output in summary mode. |
protected boolean |
isArrayContentDetail()
Gets whether to output array content detail. |
protected boolean |
isDefaultFullDetail()
Gets whether to use full detail when the caller doesn't specify. |
protected boolean |
isFullDetail(Boolean fullDetailRequest)
Is this field to be output in full detail. |
protected boolean |
isShortClassName()
Gets whether to output short or long class names. |
protected boolean |
isUseClassName()
Gets whether to use the class name. |
protected boolean |
isUseFieldNames()
Gets whether to use the field names passed in. |
protected boolean |
isUseIdentityHashCode()
Gets whether to use the identity hash code. |
protected void |
setArrayContentDetail(boolean arrayContentDetail)
Sets whether to output array content detail. |
protected void |
setArrayEnd(String arrayEnd)
Sets the array end text. |
protected void |
setArraySeparator(String arraySeparator)
Sets the array separator text. |
protected void |
setArrayStart(String arrayStart)
Sets the array start text. |
protected void |
setContentEnd(String contentEnd)
Sets the content end text. |
protected void |
setContentStart(String contentStart)
Sets the content start text. |
protected void |
setDefaultFullDetail(boolean defaultFullDetail)
Sets whether to use full detail when the caller doesn't specify. |
protected void |
setFieldNameValueSeparator(String fieldNameValueSeparator)
Sets the field name value separator text. |
protected void |
setFieldSeparator(String fieldSeparator)
Sets the field separator text. |
protected void |
setNullText(String nullText)
Sets the text to output when null found. |
protected void |
setShortClassName(boolean shortClassName)
Sets whether to output short or long class names. |
protected void |
setSizeEndText(String sizeEndText)
Sets the text to output when a Collection, Map or Array size is output. |
protected void |
setSizeStartText(String sizeStartText)
Sets the text to output when a Collection, Map or Array size is output. |
protected void |
setSummaryObjectEndText(String summaryObjectEndText)
Sets the text to output when an Object is output in summary mode. |
protected void |
setSummaryObjectStartText(String summaryObjectStartText)
Sets the text to output when an Object is output in summary mode. |
protected void |
setUseClassName(boolean useClassName)
Sets whether to use the class name. |
protected void |
setUseFieldNames(boolean useFieldNames)
Sets whether to use the field names passed in. |
protected void |
setUseIdentityHashCode(boolean useIdentityHashCode)
Sets whether to use the identity hash code. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ToStringStyle DEFAULT_STYLE
public static final ToStringStyle MULTI_LINE_STYLE
public static final ToStringStyle NO_FIELD_NAMES_STYLE
public static final ToStringStyle SIMPLE_STYLE
private boolean useFieldNames
private boolean useClassName
private boolean useShortClassName
private boolean useIdentityHashCode
private String contentStart
private String contentEnd
private String fieldNameValueSeparator
private String fieldSeparator
private String arrayStart
private String arraySeparator
private boolean arrayContentDetail
private String arrayEnd
private boolean defaultFullDetail
private String nullText
private String sizeStartText
private String sizeEndText
private String summaryObjectStartText
private String summaryObjectEndText
Constructor Detail |
protected ToStringStyle()
Method Detail |
public void appendStart(StringBuffer buffer, Object object)
buffer
- the StringBuffer to populateobject
- the object to build a toString for, must not be nullpublic void appendEnd(StringBuffer buffer, Object object)
buffer
- the StringBuffer to populateobject
- the object to build a toString for, must not be nullpublic void append(StringBuffer buffer, String fieldName, Object value, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendInternal(StringBuffer buffer, String fieldName, Object value, boolean detail)
This method performs the main lookup by Class type to correctly route arrays, collections, maps and objects to the appropriate method. Either detail or summary views can be specified.
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString, not nulldetail
- output detail or notprotected void appendDetail(StringBuffer buffer, String fieldName, Object value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString, not nullprotected void appendDetail(StringBuffer buffer, String fieldName, Collection coll)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedcoll
- the collection to add to the toString, not nullprotected void appendDetail(StringBuffer buffer, String fieldName, Map map)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedmap
- the maps to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, Object value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, long value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, long value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, int value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, int value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, short value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, short value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, byte value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, byte value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, char value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, char value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, double value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, double value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, float value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, float value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, boolean value)
buffer
- the StringBuffer to populatefieldName
- the field namevalue
- the value to add to the toStringprotected void appendDetail(StringBuffer buffer, String fieldName, boolean value)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toStringpublic void append(StringBuffer buffer, String fieldName, Object[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, Object[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, Object[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, long[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, long[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, long[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, int[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, int[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, int[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, short[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, short[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, short[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, byte[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, byte[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, byte[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, char[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, char[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, char[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, double[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, double[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, double[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, float[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, float[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, float[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullpublic void append(StringBuffer buffer, String fieldName, boolean[] array, Boolean fullDetail)
buffer
- the StringBuffer to populatefieldName
- the field namearray
- the array to add to the toStringfullDetail
- true for detail, false for summary info, null for style decidesprotected void appendDetail(StringBuffer buffer, String fieldName, boolean[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendSummary(StringBuffer buffer, String fieldName, boolean[] array)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString, not nullprotected void appendClassName(StringBuffer buffer, Object object)
buffer
- the StringBuffer to populateobject
- the object whose name to outputprotected void appendIdentityHashCode(StringBuffer buffer, Object object)
buffer
- the StringBuffer to populateobject
- the object whose id to outputprotected void appendContentStart(StringBuffer buffer)
buffer
- the StringBuffer to populateprotected void appendContentEnd(StringBuffer buffer)
buffer
- the StringBuffer to populateprotected void appendNullText(StringBuffer buffer, String fieldName)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedprotected void appendFieldSeparator(StringBuffer buffer)
buffer
- the StringBuffer to populateprotected void appendFieldStart(StringBuffer buffer, String fieldName)
buffer
- the StringBuffer to populatefieldName
- the field nameprotected void appendFieldEnd(StringBuffer buffer, String fieldName)
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedprotected void appendSummarySize(StringBuffer buffer, String fieldName, int size)
The size summary is used to summarize the contents of collections, maps and arrays. The text output is a prefix, the size (passed in) and a suffix. The default format is '<size=n>'.
buffer
- the StringBuffer to populatefieldName
- the field name, typically not used as already appendedsize
- the size to appendprotected boolean isFullDetail(Boolean fullDetailRequest)
This method converts a detail request into a detail level. The calling code may request full detail (true), but a subclass might ignore that and always return false. The calling code may pass in null indicating that it doesn't care about the detail level. In this case the default detail level is used.
fullDetailRequest
- the detail level requested
protected String getShortClassName(Class cls)
The short class name is the name excluding the package name.
cls
- the class to get the short name of
protected boolean isUseClassName()
protected void setUseClassName(boolean useClassName)
useClassName
- the new useClassName flagprotected boolean isShortClassName()
protected void setShortClassName(boolean shortClassName)
shortClassName
- the new shortClassName flagprotected boolean isUseIdentityHashCode()
protected void setUseIdentityHashCode(boolean useIdentityHashCode)
useIdentityHashCode
- the new useIdentityHashCode flagprotected boolean isUseFieldNames()
protected void setUseFieldNames(boolean useFieldNames)
useFieldNames
- the new useFieldNames flagprotected boolean isDefaultFullDetail()
protected void setDefaultFullDetail(boolean defaultFullDetail)
defaultFullDetail
- the new defaultFullDetail flagprotected boolean isArrayContentDetail()
protected void setArrayContentDetail(boolean arrayContentDetail)
arrayContentDetail
- the new arrayContentDetail flagprotected String getArrayStart()
protected void setArrayStart(String arrayStart)
arrayStart
- the new array start textprotected String getArrayEnd()
protected void setArrayEnd(String arrayEnd)
arrayEnd
- the new array end textprotected String getArraySeparator()
protected void setArraySeparator(String arraySeparator)
arraySeparator
- the new array separator textprotected String getContentStart()
protected void setContentStart(String contentStart)
contentStart
- the new content start textprotected String getContentEnd()
protected void setContentEnd(String contentEnd)
contentEnd
- the new content end textprotected String getFieldNameValueSeparator()
protected void setFieldNameValueSeparator(String fieldNameValueSeparator)
fieldNameValueSeparator
- the new field name value separator textprotected String getFieldSeparator()
protected void setFieldSeparator(String fieldSeparator)
fieldSeparator
- the new field separator textprotected String getNullText()
protected void setNullText(String nullText)
nullText
- the new text to output when null foundprotected String getSizeStartText()
protected void setSizeStartText(String sizeStartText)
sizeStartText
- the new start of size textprotected String getSizeEndText()
protected void setSizeEndText(String sizeEndText)
sizeEndText
- the new end of size textprotected String getSummaryObjectStartText()
protected void setSummaryObjectStartText(String summaryObjectStartText)
summaryObjectStartText
- the new start of summary textprotected String getSummaryObjectEndText()
protected void setSummaryObjectEndText(String summaryObjectEndText)
summaryObjectEndText
- the new end of summary text
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |