|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.lang.builder.ToStringStyle | +--org.apache.commons.lang.builder.StandardToStringStyle
StandardToStringStyle
works with ToStringBuilder to create a
toString.
This class is intended to be used as a singleton. There is no need to instantiate a new style each time. Your code should instantiate the class once, customize the values as required, and then store the result in a public static final variable for the rest of the program to access.
Inner classes inherited from class org.apache.commons.lang.builder.ToStringStyle |
ToStringStyle.DefaultToStringStyle,
ToStringStyle.MultiLineToStringStyle,
ToStringStyle.NoFieldNameToStringStyle,
ToStringStyle.SimpleToStringStyle |
Fields inherited from class org.apache.commons.lang.builder.ToStringStyle |
arrayContentDetail,
arrayEnd,
arraySeparator,
arrayStart,
contentEnd,
contentStart,
DEFAULT_STYLE,
defaultFullDetail,
fieldNameValueSeparator,
fieldSeparator,
MULTI_LINE_STYLE,
NO_FIELD_NAMES_STYLE,
nullText,
SIMPLE_STYLE,
sizeEndText,
sizeStartText,
summaryObjectEndText,
summaryObjectStartText,
useClassName,
useFieldNames,
useIdentityHashCode,
useShortClassName |
Constructor Summary | |
StandardToStringStyle()
Constructor. |
Method Summary | |
java.lang.String |
getArrayEnd()
Gets the array end text. |
java.lang.String |
getArraySeparator()
Gets the array separator text. |
java.lang.String |
getArrayStart()
Gets the array start text. |
java.lang.String |
getContentEnd()
Gets the content end text. |
java.lang.String |
getContentStart()
Gets the content start text. |
java.lang.String |
getFieldNameValueSeparator()
Gets the field name value separator text. |
java.lang.String |
getFieldSeparator()
Gets the field separator text. |
java.lang.String |
getNullText()
Gets the text to output when null found. |
java.lang.String |
getSizeEndText()
Gets the text to output when a Collection, Map or Array size is output. |
java.lang.String |
getSizeStartText()
Gets the text to output when a Collection, Map or Array size is output. |
java.lang.String |
getSummaryObjectEndText()
Gets the text to output when an Object is output in summary mode. |
java.lang.String |
getSummaryObjectStartText()
Gets the text to output when an Object is output in summary mode. |
boolean |
isArrayContentDetail()
Gets whether to output array content detail. |
boolean |
isDefaultFullDetail()
Gets whether to use full detail when the caller doesn't specify. |
boolean |
isShortClassName()
Gets whether to output short or long class names. |
boolean |
isUseClassName()
Gets whether to use the class name. |
boolean |
isUseFieldNames()
Gets whether to use the field names passed in. |
boolean |
isUseIdentityHashCode()
Gets whether to use the identity hash code. |
void |
setArrayContentDetail(boolean arrayContentDetail)
Sets whether to output array content detail. |
void |
setArrayEnd(java.lang.String arrayEnd)
Sets the array end text. |
void |
setArraySeparator(java.lang.String arraySeparator)
Sets the array separator text. |
void |
setArrayStart(java.lang.String arrayStart)
Sets the array start text. |
void |
setContentEnd(java.lang.String contentEnd)
Sets the content end text. |
void |
setContentStart(java.lang.String contentStart)
Sets the content start text. |
void |
setDefaultFullDetail(boolean defaultFullDetail)
Sets whether to use full detail when the caller doesn't specify. |
void |
setFieldNameValueSeparator(java.lang.String fieldNameValueSeparator)
Sets the field name value separator text. |
void |
setFieldSeparator(java.lang.String fieldSeparator)
Sets the field separator text. |
void |
setNullText(java.lang.String nullText)
Sets the text to output when null found. |
void |
setShortClassName(boolean shortClassName)
Sets whether to output short or long class names. |
void |
setSizeEndText(java.lang.String sizeEndText)
Sets the text to output when a Collection, Map or Array size is output. |
void |
setSizeStartText(java.lang.String sizeStartText)
Sets the text to output when a Collection, Map or Array size is output. |
void |
setSummaryObjectEndText(java.lang.String summaryObjectEndText)
Sets the text to output when an Object is output in summary mode. |
void |
setSummaryObjectStartText(java.lang.String summaryObjectStartText)
Sets the text to output when an Object is output in summary mode. |
void |
setUseClassName(boolean useClassName)
Sets whether to use the class name. |
void |
setUseFieldNames(boolean useFieldNames)
Sets whether to use the field names passed in. |
void |
setUseIdentityHashCode(boolean useIdentityHashCode)
Sets whether to use the identity hash code. |
Methods inherited from class org.apache.commons.lang.builder.ToStringStyle |
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
append,
appendClassName,
appendContentEnd,
appendContentStart,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendDetail,
appendEnd,
appendFieldEnd,
appendFieldSeparator,
appendFieldStart,
appendIdentityHashCode,
appendInternal,
appendNullText,
appendStart,
appendSummary,
appendSummary,
appendSummary,
appendSummary,
appendSummary,
appendSummary,
appendSummary,
appendSummary,
appendSummary,
appendSummary,
appendSummarySize,
getShortClassName,
isFullDetail |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public StandardToStringStyle()
Method Detail |
public boolean isUseClassName()
public void setUseClassName(boolean useClassName)
useClassName
- the new useClassName flagpublic boolean isShortClassName()
public void setShortClassName(boolean shortClassName)
shortClassName
- the new shortClassName flagpublic boolean isUseIdentityHashCode()
public void setUseIdentityHashCode(boolean useIdentityHashCode)
useIdentityHashCode
- the new useIdentityHashCode flagpublic boolean isUseFieldNames()
public void setUseFieldNames(boolean useFieldNames)
useFieldNames
- the new useFieldNames flagpublic boolean isDefaultFullDetail()
public void setDefaultFullDetail(boolean defaultFullDetail)
defaultFullDetail
- the new defaultFullDetail flagpublic boolean isArrayContentDetail()
public void setArrayContentDetail(boolean arrayContentDetail)
arrayContentDetail
- the new arrayContentDetail flagpublic java.lang.String getArrayStart()
public void setArrayStart(java.lang.String arrayStart)
arrayStart
- the new array start textpublic java.lang.String getArrayEnd()
public void setArrayEnd(java.lang.String arrayEnd)
arrayEnd
- the new array end textpublic java.lang.String getArraySeparator()
public void setArraySeparator(java.lang.String arraySeparator)
arraySeparator
- the new array separator textpublic java.lang.String getContentStart()
public void setContentStart(java.lang.String contentStart)
contentStart
- the new content start textpublic java.lang.String getContentEnd()
public void setContentEnd(java.lang.String contentEnd)
contentEnd
- the new content end textpublic java.lang.String getFieldNameValueSeparator()
public void setFieldNameValueSeparator(java.lang.String fieldNameValueSeparator)
fieldNameValueSeparator
- the new field name value separator textpublic java.lang.String getFieldSeparator()
public void setFieldSeparator(java.lang.String fieldSeparator)
fieldSeparator
- the new field separator textpublic java.lang.String getNullText()
public void setNullText(java.lang.String nullText)
nullText
- the new text to output when null foundpublic java.lang.String getSizeStartText()
public void setSizeStartText(java.lang.String sizeStartText)
sizeStartText
- the new start of size textpublic java.lang.String getSizeEndText()
public void setSizeEndText(java.lang.String sizeEndText)
sizeEndText
- the new end of size textpublic java.lang.String getSummaryObjectStartText()
public void setSummaryObjectStartText(java.lang.String summaryObjectStartText)
summaryObjectStartText
- the new start of summary textpublic java.lang.String getSummaryObjectEndText()
public void setSummaryObjectEndText(java.lang.String summaryObjectEndText)
summaryObjectEndText
- the new end of summary text
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |