append
public 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.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
fullDetail
- true
for detail, false
for summary info, null
for style decides
append
public void append(StringBuffer buffer,
String fieldName,
Object[] array,
Boolean fullDetail)
Append to the toString
an Object
array.
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 decides
append
public void append(StringBuffer buffer,
String fieldName,
boolean value)
Append to the toString
a boolean
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
boolean[] array,
Boolean fullDetail)
Append to the toString
a boolean
array.
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 decides
append
public void append(StringBuffer buffer,
String fieldName,
byte value)
Append to the toString
a byte
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
byte[] array,
Boolean fullDetail)
Append to the toString
a byte
array.
buffer
- the StringBuffer
to populatefieldName
- the field namearray
- the array to add to the toString
fullDetail
- true
for detail, false
for summary info, null
for style decides
append
public void append(StringBuffer buffer,
String fieldName,
char value)
Append to the toString
a char
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
char[] array,
Boolean fullDetail)
Append to the toString
a char
array.
buffer
- the StringBuffer
to populatefieldName
- the field namearray
- the array to add to the toString
fullDetail
- true
for detail, false
for summary info, null
for style decides
append
public void append(StringBuffer buffer,
String fieldName,
double value)
Append to the toString
a double
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
double[] array,
Boolean fullDetail)
Append to the toString
a double
array.
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 decides
append
public void append(StringBuffer buffer,
String fieldName,
float value)
Append to the toString
a float
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
float[] array,
Boolean fullDetail)
Append to the toString
a float
array.
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 decides
append
public void append(StringBuffer buffer,
String fieldName,
int value)
Append to the toString
an int
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
int[] array,
Boolean fullDetail)
Append to the toString
an int
array.
buffer
- the StringBuffer
to populatefieldName
- the field namearray
- the array to add to the toString
fullDetail
- true
for detail, false
for summary info, null
for style decides
append
public void append(StringBuffer buffer,
String fieldName,
long value)
Append to the toString
a long
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
long[] array,
Boolean fullDetail)
Append to the toString
a long
array.
buffer
- the StringBuffer
to populatefieldName
- the field namearray
- the array to add to the toString
fullDetail
- true
for detail, false
for summary info, null
for style decides
append
public void append(StringBuffer buffer,
String fieldName,
short value)
Append to the toString
a short
value.
buffer
- the StringBuffer
to populatefieldName
- the field namevalue
- the value to add to the toString
append
public void append(StringBuffer buffer,
String fieldName,
short[] array,
Boolean fullDetail)
Append to the toString
a short
array.
buffer
- the StringBuffer
to populatefieldName
- the field namearray
- the array to add to the toString
fullDetail
- true
for detail, false
for summary info, null
for style decides
appendClassName
protected void appendClassName(StringBuffer buffer,
Object object)
Append to the toString
the class name.
buffer
- the StringBuffer
to populateobject
- the Object
whose name to output
appendContentEnd
protected void appendContentEnd(StringBuffer buffer)
Append to the toString
the content end.
buffer
- the StringBuffer
to populate
appendContentStart
protected void appendContentStart(StringBuffer buffer)
Append to the toString
the content start.
buffer
- the StringBuffer
to populate
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
Collection coll)
Append to the toString
a Collection
.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedcoll
- the Collection
to add to the
toString
, not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
Map map)
Append to the toString
a Map
.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedmap
- the Map
to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
Object value)
Append to the toString
an Object
value, printing the full detail of the Object
.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
Object[] array)
Append to the toString
the detail of an
Object
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
boolean value)
Append to the toString
a boolean
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
boolean[] array)
Append to the toString
the detail of a
boolean
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
byte value)
Append to the toString
a byte
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
byte[] array)
Append to the toString
the detail of a
byte
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
char value)
Append to the toString
a char
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
char[] array)
Append to the toString
the detail of a
char
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
double value)
Append to the toString
a double
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
double[] array)
Append to the toString
the detail of a
double
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
float value)
Append to the toString
a float
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
float[] array)
Append to the toString
the detail of a
float
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
int value)
Append to the toString
an int
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
int[] array)
Append to the toString
the detail of an
int
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
long value)
Append to the toString
a long
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
long[] array)
Append to the toString
the detail of a
long
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
short value)
Append to the toString
a short
value.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
appendDetail
protected void appendDetail(StringBuffer buffer,
String fieldName,
short[] array)
Append to the toString
the detail of a
short
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendEnd
public void appendEnd(StringBuffer buffer,
Object object)
Append to the toString
the end of data indicator.
buffer
- the StringBuffer
to populateobject
- the Object
to build a
toString
for.
appendFieldEnd
protected void appendFieldEnd(StringBuffer buffer,
String fieldName)
Append to the toString
the field end.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appended
appendFieldSeparator
protected void appendFieldSeparator(StringBuffer buffer)
Append to the toString
the field separator.
buffer
- the StringBuffer
to populate
appendFieldStart
protected void appendFieldStart(StringBuffer buffer,
String fieldName)
Append to the toString
the field start.
buffer
- the StringBuffer
to populatefieldName
- the field name
appendIdentityHashCode
protected void appendIdentityHashCode(StringBuffer buffer,
Object object)
Append the System.identityHashCode(java.lang.Object)
.
buffer
- the StringBuffer
to populateobject
- the Object
whose id to output
appendInternal
protected void appendInternal(StringBuffer buffer,
String fieldName,
Object value,
boolean detail)
Append to the
toString
an
Object
,
correctly interpreting its type.
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.
If a cycle is detected, an object will be appended with the
Object.toString()
format.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
,
not null
detail
- output detail or not
appendNullText
protected void appendNullText(StringBuffer buffer,
String fieldName)
Append to the
toString
an indicator for
null
.
The default indicator is
'<null>'
.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appended
appendStart
public void appendStart(StringBuffer buffer,
Object object)
Append to the toString
the start of data indicator.
buffer
- the StringBuffer
to populateobject
- the Object
to build a toString
for
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
Object value)
Append to the toString
an Object
value, printing a summary of the Object
.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedvalue
- the value to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
Object[] array)
Append to the toString
a summary of an
Object
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
boolean[] array)
Append to the toString
a summary of a
boolean
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
byte[] array)
Append to the toString
a summary of a
byte
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
char[] array)
Append to the toString
a summary of a
char
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
double[] array)
Append to the toString
a summary of a
double
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
float[] array)
Append to the toString
a summary of a
float
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
int[] array)
Append to the toString
a summary of an
int
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
long[] array)
Append to the toString
a summary of a
long
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummary
protected void appendSummary(StringBuffer buffer,
String fieldName,
short[] array)
Append to the toString
a summary of a
short
array.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
appendSummarySize
protected void appendSummarySize(StringBuffer buffer,
String fieldName,
int size)
Append to the
toString
a size summary.
The size summary is used to summarize the contents of
Collections
,
Maps
and arrays.
The output consists of a prefix, the passed in size
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 append
appendSuper
public void appendSuper(StringBuffer buffer,
String superToString)
Append to the
toString
the superclass toString.
A
null
superToString
is ignored.
buffer
- the StringBuffer
to populatesuperToString
- the super.toString()
appendToString
public void appendToString(StringBuffer buffer,
String toString)
Append to the
toString
another toString.
A
null
toString
is ignored.
buffer
- the StringBuffer
to populatetoString
- the additional toString
getArrayEnd
protected String getArrayEnd()
Gets the array end text.
- the current array end text
getArraySeparator
protected String getArraySeparator()
Gets the array separator text.
- the current array separator text
getArrayStart
protected String getArrayStart()
Gets the array start text.
- the current array start text
getContentEnd
protected String getContentEnd()
Gets the content end text.
- the current content end text
getContentStart
protected String getContentStart()
Gets the content start text.
- the current content start text
getFieldNameValueSeparator
protected String getFieldNameValueSeparator()
Gets the field name value separator text.
- the current field name value separator text
getFieldSeparator
protected String getFieldSeparator()
Gets the field separator text.
- the current field separator text
getNullText
protected String getNullText()
Gets the text to output when null
found.
- the current text to output when null found
getShortClassName
protected String getShortClassName(Class cls)
Gets the short class name for a class.
The short class name is the classname excluding
the package name.
cls
- the Class
to get the short name of
getSizeEndText
protected String getSizeEndText()
Gets the end text to output when a
Collection
,
Map
or array size is output.
This is output after the size value.
- the current end of size text
getSizeStartText
protected String getSizeStartText()
Gets the start text to output when a
Collection
,
Map
or array size is output.
This is output before the size value.
- the current start of size text
getSummaryObjectEndText
protected String getSummaryObjectEndText()
Gets the end text to output when an
Object
is
output in summary mode.
This is output after the size value.
- the current end of summary text
getSummaryObjectStartText
protected String getSummaryObjectStartText()
Gets the start text to output when an
Object
is
output in summary mode.
This is output before the size value.
- the current start of summary text
isArrayContentDetail
protected boolean isArrayContentDetail()
Gets whether to output array content detail.
- the current array content detail setting
isDefaultFullDetail
protected boolean isDefaultFullDetail()
Gets whether to use full detail when the caller doesn't
specify.
- the current defaultFullDetail flag
isFieldSeparatorAtEnd
protected boolean isFieldSeparatorAtEnd()
Gets whether the field separator should be added at the end
of each buffer.
isFieldSeparatorAtStart
protected boolean isFieldSeparatorAtStart()
Gets whether the field separator should be added at the start
of each buffer.
- the fieldSeparatorAtStart flag
isFullDetail
protected boolean isFullDetail(Boolean fullDetailRequest)
Is this field to be output in full detail.
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
- whether full detail is to be shown
isShortClassName
protected boolean isShortClassName()
Use isUseShortClassName()
Method will be removed in Commons Lang 3.0.
Gets whether to output short or long class names.
- the current shortClassName flag
isUseClassName
protected boolean isUseClassName()
Gets whether to use the class name.
- the current useClassName flag
isUseFieldNames
protected boolean isUseFieldNames()
Gets whether to use the field names passed in.
- the current useFieldNames flag
isUseIdentityHashCode
protected boolean isUseIdentityHashCode()
Gets whether to use the identity hash code.
- the current useIdentityHashCode flag
isUseShortClassName
protected boolean isUseShortClassName()
Gets whether to output short or long class names.
- the current useShortClassName flag
reflectionAppendArrayDetail
protected void reflectionAppendArrayDetail(StringBuffer buffer,
String fieldName,
Object array)
Append to the toString
the detail of an array type.
buffer
- the StringBuffer
to populatefieldName
- the field name, typically not used as already appendedarray
- the array to add to the toString
,
not null
removeLastFieldSeparator
protected void removeLastFieldSeparator(StringBuffer buffer)
Remove the last field separator from the buffer.
buffer
- the StringBuffer
to populate
setArrayContentDetail
protected void setArrayContentDetail(boolean arrayContentDetail)
Sets whether to output array content detail.
arrayContentDetail
- the new arrayContentDetail flag
setArrayEnd
protected void setArrayEnd(String arrayEnd)
Sets the array end text.
null
is accepted, but will be converted to
an empty String.
arrayEnd
- the new array end text
setArraySeparator
protected void setArraySeparator(String arraySeparator)
Sets the array separator text.
null
is accepted, but will be converted to
an empty String.
arraySeparator
- the new array separator text
setArrayStart
protected void setArrayStart(String arrayStart)
Sets the array start text.
null
is accepted, but will be converted to
an empty String.
arrayStart
- the new array start text
setContentEnd
protected void setContentEnd(String contentEnd)
Sets the content end text.
null
is accepted, but will be converted to
an empty String.
contentEnd
- the new content end text
setContentStart
protected void setContentStart(String contentStart)
Sets the content start text.
null
is accepted, but will be converted to
an empty String.
contentStart
- the new content start text
setDefaultFullDetail
protected void setDefaultFullDetail(boolean defaultFullDetail)
Sets whether to use full detail when the caller doesn't
specify.
defaultFullDetail
- the new defaultFullDetail flag
setFieldNameValueSeparator
protected void setFieldNameValueSeparator(String fieldNameValueSeparator)
Sets the field name value separator text.
null
is accepted, but will be converted to
an empty String.
fieldNameValueSeparator
- the new field name value separator text
setFieldSeparator
protected void setFieldSeparator(String fieldSeparator)
Sets the field separator text.
null
is accepted, but will be converted to
an empty String.
fieldSeparator
- the new field separator text
setFieldSeparatorAtEnd
protected void setFieldSeparatorAtEnd(boolean fieldSeparatorAtEnd)
Sets whether the field separator should be added at the end
of each buffer.
fieldSeparatorAtEnd
- the fieldSeparatorAtEnd flag
setFieldSeparatorAtStart
protected void setFieldSeparatorAtStart(boolean fieldSeparatorAtStart)
Sets whether the field separator should be added at the start
of each buffer.
fieldSeparatorAtStart
- the fieldSeparatorAtStart flag
setNullText
protected void setNullText(String nullText)
Sets the text to output when
null
found.
null
is accepted, but will be converted to
an empty String.
nullText
- the new text to output when null found
setShortClassName
protected void setShortClassName(boolean shortClassName)
Use setUseShortClassName(boolean)
Method will be removed in Commons Lang 3.0.
Sets whether to output short or long class names.
shortClassName
- the new shortClassName flag
setSizeEndText
protected void setSizeEndText(String sizeEndText)
Sets the end text to output when a
Collection
,
Map
or array size is output.
This is output after the size value.
null
is accepted, but will be converted to
an empty String.
sizeEndText
- the new end of size text
setSizeStartText
protected void setSizeStartText(String sizeStartText)
Sets the start text to output when a
Collection
,
Map
or array size is output.
This is output before the size value.
null
is accepted, but will be converted to
an empty String.
sizeStartText
- the new start of size text
setSummaryObjectEndText
protected void setSummaryObjectEndText(String summaryObjectEndText)
Sets the end text to output when an
Object
is
output in summary mode.
This is output after the size value.
null
is accepted, but will be converted to
an empty String.
summaryObjectEndText
- the new end of summary text
setSummaryObjectStartText
protected void setSummaryObjectStartText(String summaryObjectStartText)
Sets the start text to output when an
Object
is
output in summary mode.
This is output before the size value.
null
is accepted, but will be converted to
an empty String.
summaryObjectStartText
- the new start of summary text
setUseClassName
protected void setUseClassName(boolean useClassName)
Sets whether to use the class name.
useClassName
- the new useClassName flag
setUseFieldNames
protected void setUseFieldNames(boolean useFieldNames)
Sets whether to use the field names passed in.
useFieldNames
- the new useFieldNames flag
setUseIdentityHashCode
protected void setUseIdentityHashCode(boolean useIdentityHashCode)
Sets whether to use the identity hash code.
useIdentityHashCode
- the new useIdentityHashCode flag
setUseShortClassName
protected void setUseShortClassName(boolean useShortClassName)
Sets whether to output short or long class names.
useShortClassName
- the new useShortClassName flag