|
||||||||||
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 | +--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.
Nested Class Summary |
Nested classes inherited from class org.apache.commons.lang.builder.ToStringStyle |
|
Field Summary |
Fields inherited from class org.apache.commons.lang.builder.ToStringStyle |
DEFAULT_STYLE, MULTI_LINE_STYLE, NO_FIELD_NAMES_STYLE, SIMPLE_STYLE |
Constructor Summary | |
StandardToStringStyle()
Constructor. |
Method Summary | |
String |
getArrayEnd()
Gets the array end text. |
String |
getArraySeparator()
Gets the array separator text. |
String |
getArrayStart()
Gets the array start text. |
String |
getContentEnd()
Gets the content end text. |
String |
getContentStart()
Gets the content start text. |
String |
getFieldNameValueSeparator()
Gets the field name value separator text. |
String |
getFieldSeparator()
Gets the field separator text. |
String |
getNullText()
Gets the text to output when null found. |
String |
getSizeEndText()
Gets the text to output when a Collection, Map or Array size is output. |
String |
getSizeStartText()
Gets the text to output when a Collection, Map or Array size is output. |
String |
getSummaryObjectEndText()
Gets the text to output when an Object is output in summary mode. |
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(String arrayEnd)
Sets the array end text. |
void |
setArraySeparator(String arraySeparator)
Sets the array separator text. |
void |
setArrayStart(String arrayStart)
Sets the array start text. |
void |
setContentEnd(String contentEnd)
Sets the content end text. |
void |
setContentStart(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(String fieldNameValueSeparator)
Sets the field name value separator text. |
void |
setFieldSeparator(String fieldSeparator)
Sets the field separator text. |
void |
setNullText(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(String sizeEndText)
Sets the text to output when a Collection, Map or Array size is output. |
void |
setSizeStartText(String sizeStartText)
Sets the text to output when a Collection, Map or Array size is output. |
void |
setSummaryObjectEndText(String summaryObjectEndText)
Sets the text to output when an Object is output in summary mode. |
void |
setSummaryObjectStartText(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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StandardToStringStyle()
Method Detail |
public boolean isUseClassName()
isUseClassName
in class ToStringStyle
public void setUseClassName(boolean useClassName)
setUseClassName
in class ToStringStyle
useClassName
- the new useClassName flagpublic boolean isShortClassName()
isShortClassName
in class ToStringStyle
public void setShortClassName(boolean shortClassName)
setShortClassName
in class ToStringStyle
shortClassName
- the new shortClassName flagpublic boolean isUseIdentityHashCode()
isUseIdentityHashCode
in class ToStringStyle
public void setUseIdentityHashCode(boolean useIdentityHashCode)
setUseIdentityHashCode
in class ToStringStyle
useIdentityHashCode
- the new useIdentityHashCode flagpublic boolean isUseFieldNames()
isUseFieldNames
in class ToStringStyle
public void setUseFieldNames(boolean useFieldNames)
setUseFieldNames
in class ToStringStyle
useFieldNames
- the new useFieldNames flagpublic boolean isDefaultFullDetail()
isDefaultFullDetail
in class ToStringStyle
public void setDefaultFullDetail(boolean defaultFullDetail)
setDefaultFullDetail
in class ToStringStyle
defaultFullDetail
- the new defaultFullDetail flagpublic boolean isArrayContentDetail()
isArrayContentDetail
in class ToStringStyle
public void setArrayContentDetail(boolean arrayContentDetail)
setArrayContentDetail
in class ToStringStyle
arrayContentDetail
- the new arrayContentDetail flagpublic String getArrayStart()
getArrayStart
in class ToStringStyle
public void setArrayStart(String arrayStart)
setArrayStart
in class ToStringStyle
arrayStart
- the new array start textpublic String getArrayEnd()
getArrayEnd
in class ToStringStyle
public void setArrayEnd(String arrayEnd)
setArrayEnd
in class ToStringStyle
arrayEnd
- the new array end textpublic String getArraySeparator()
getArraySeparator
in class ToStringStyle
public void setArraySeparator(String arraySeparator)
setArraySeparator
in class ToStringStyle
arraySeparator
- the new array separator textpublic String getContentStart()
getContentStart
in class ToStringStyle
public void setContentStart(String contentStart)
setContentStart
in class ToStringStyle
contentStart
- the new content start textpublic String getContentEnd()
getContentEnd
in class ToStringStyle
public void setContentEnd(String contentEnd)
setContentEnd
in class ToStringStyle
contentEnd
- the new content end textpublic String getFieldNameValueSeparator()
getFieldNameValueSeparator
in class ToStringStyle
public void setFieldNameValueSeparator(String fieldNameValueSeparator)
setFieldNameValueSeparator
in class ToStringStyle
fieldNameValueSeparator
- the new field name value separator textpublic String getFieldSeparator()
getFieldSeparator
in class ToStringStyle
public void setFieldSeparator(String fieldSeparator)
setFieldSeparator
in class ToStringStyle
fieldSeparator
- the new field separator textpublic String getNullText()
getNullText
in class ToStringStyle
public void setNullText(String nullText)
setNullText
in class ToStringStyle
nullText
- the new text to output when null foundpublic String getSizeStartText()
getSizeStartText
in class ToStringStyle
public void setSizeStartText(String sizeStartText)
setSizeStartText
in class ToStringStyle
sizeStartText
- the new start of size textpublic String getSizeEndText()
getSizeEndText
in class ToStringStyle
public void setSizeEndText(String sizeEndText)
setSizeEndText
in class ToStringStyle
sizeEndText
- the new end of size textpublic String getSummaryObjectStartText()
getSummaryObjectStartText
in class ToStringStyle
public void setSummaryObjectStartText(String summaryObjectStartText)
setSummaryObjectStartText
in class ToStringStyle
summaryObjectStartText
- the new start of summary textpublic String getSummaryObjectEndText()
getSummaryObjectEndText
in class ToStringStyle
public void setSummaryObjectEndText(String summaryObjectEndText)
setSummaryObjectEndText
in class ToStringStyle
summaryObjectEndText
- the new end of summary text
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |