Class StandardToStringStyle
- java.lang.Object
-
- org.apache.commons.lang.builder.ToStringStyle
-
- org.apache.commons.lang.builder.StandardToStringStyle
-
- All Implemented Interfaces:
java.io.Serializable
@Deprecated(since="2021-04-30") public class StandardToStringStyle extends ToStringStyle
Deprecated.Commons Lang 2 is in maintenance mode. Commons Lang 3 should be used instead.Works with
ToStringBuilder
to create atoString
.This class is intended to be used as a singleton. There is no need to instantiate a new style each time. Simply instantiate the class once, customize the values as required, and store the result in a public static final variable for the rest of the program to access.
- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.commons.lang.builder.ToStringStyle
DEFAULT_STYLE, MULTI_LINE_STYLE, NO_FIELD_NAMES_STYLE, SHORT_PREFIX_STYLE, SIMPLE_STYLE
-
-
Constructor Summary
Constructors Constructor Description StandardToStringStyle()
Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getArrayEnd()
Deprecated.Gets the array end text.java.lang.String
getArraySeparator()
Deprecated.Gets the array separator text.java.lang.String
getArrayStart()
Deprecated.Gets the array start text.java.lang.String
getContentEnd()
Deprecated.Gets the content end text.java.lang.String
getContentStart()
Deprecated.Gets the content start text.java.lang.String
getFieldNameValueSeparator()
Deprecated.Gets the field name value separator text.java.lang.String
getFieldSeparator()
Deprecated.Gets the field separator text.java.lang.String
getNullText()
Deprecated.Gets the text to output whennull
found.java.lang.String
getSizeEndText()
Deprecated.Gets the end text to output when aCollection
,Map
orArray
size is output.java.lang.String
getSizeStartText()
Deprecated.Gets the text to output when aCollection
,Map
orArray
size is output.java.lang.String
getSummaryObjectEndText()
Deprecated.Gets the end text to output when anObject
is output in summary mode.java.lang.String
getSummaryObjectStartText()
Deprecated.Gets the start text to output when anObject
is output in summary mode.boolean
isArrayContentDetail()
Deprecated.Gets whether to output array content detail.boolean
isDefaultFullDetail()
Deprecated.Gets whether to use full detail when the caller doesn't specify.boolean
isFieldSeparatorAtEnd()
Deprecated.Gets whether the field separator should be added at the end of each buffer.boolean
isFieldSeparatorAtStart()
Deprecated.Gets whether the field separator should be added at the start of each buffer.boolean
isShortClassName()
Deprecated.UseisUseShortClassName()
Method will be removed in Commons Lang 3.0.boolean
isUseClassName()
Deprecated.Gets whether to use the class name.boolean
isUseFieldNames()
Deprecated.Gets whether to use the field names passed in.boolean
isUseIdentityHashCode()
Deprecated.Gets whether to use the identity hash code.boolean
isUseShortClassName()
Deprecated.Gets whether to output short or long class names.void
setArrayContentDetail(boolean arrayContentDetail)
Deprecated.Sets whether to output array content detail.void
setArrayEnd(java.lang.String arrayEnd)
Deprecated.Sets the array end text.void
setArraySeparator(java.lang.String arraySeparator)
Deprecated.Sets the array separator text.void
setArrayStart(java.lang.String arrayStart)
Deprecated.Sets the array start text.void
setContentEnd(java.lang.String contentEnd)
Deprecated.Sets the content end text.void
setContentStart(java.lang.String contentStart)
Deprecated.Sets the content start text.void
setDefaultFullDetail(boolean defaultFullDetail)
Deprecated.Sets whether to use full detail when the caller doesn't specify.void
setFieldNameValueSeparator(java.lang.String fieldNameValueSeparator)
Deprecated.Sets the field name value separator text.void
setFieldSeparator(java.lang.String fieldSeparator)
Deprecated.Sets the field separator text.void
setFieldSeparatorAtEnd(boolean fieldSeparatorAtEnd)
Deprecated.Sets whether the field separator should be added at the end of each buffer.void
setFieldSeparatorAtStart(boolean fieldSeparatorAtStart)
Deprecated.Sets whether the field separator should be added at the start of each buffer.void
setNullText(java.lang.String nullText)
Deprecated.Sets the text to output whennull
found.void
setShortClassName(boolean shortClassName)
Deprecated.UsesetUseShortClassName(boolean)
Method will be removed in Commons Lang 3.0.void
setSizeEndText(java.lang.String sizeEndText)
Deprecated.Sets the end text to output when aCollection
,Map
orArray
size is output.void
setSizeStartText(java.lang.String sizeStartText)
Deprecated.Sets the start text to output when aCollection
,Map
orArray
size is output.void
setSummaryObjectEndText(java.lang.String summaryObjectEndText)
Deprecated.Sets the end text to output when anObject
is output in summary mode.void
setSummaryObjectStartText(java.lang.String summaryObjectStartText)
Deprecated.Sets the start text to output when anObject
is output in summary mode.void
setUseClassName(boolean useClassName)
Deprecated.Sets whether to use the class name.void
setUseFieldNames(boolean useFieldNames)
Deprecated.Sets whether to use the field names passed in.void
setUseIdentityHashCode(boolean useIdentityHashCode)
Deprecated.Sets whether to use the identity hash code.void
setUseShortClassName(boolean useShortClassName)
Deprecated.Sets whether to output short or long class names.
-
-
-
Method Detail
-
isUseClassName
public boolean isUseClassName()
Deprecated.Gets whether to use the class name.
- Returns:
- the current useClassName flag
-
setUseClassName
public void setUseClassName(boolean useClassName)
Deprecated.Sets whether to use the class name.
- Parameters:
useClassName
- the new useClassName flag
-
isUseShortClassName
public boolean isUseShortClassName()
Deprecated.Gets whether to output short or long class names.
- Returns:
- the current useShortClassName flag
- Since:
- 2.0
-
isShortClassName
public boolean isShortClassName()
Deprecated.UseisUseShortClassName()
Method will be removed in Commons Lang 3.0.Gets whether to output short or long class names.
- Returns:
- the current shortClassName flag
-
setUseShortClassName
public void setUseShortClassName(boolean useShortClassName)
Deprecated.Sets whether to output short or long class names.
- Parameters:
useShortClassName
- the new useShortClassName flag- Since:
- 2.0
-
setShortClassName
public void setShortClassName(boolean shortClassName)
Deprecated.UsesetUseShortClassName(boolean)
Method will be removed in Commons Lang 3.0.Sets whether to output short or long class names.
- Parameters:
shortClassName
- the new shortClassName flag
-
isUseIdentityHashCode
public boolean isUseIdentityHashCode()
Deprecated.Gets whether to use the identity hash code.
- Returns:
- the current useIdentityHashCode flag
-
setUseIdentityHashCode
public void setUseIdentityHashCode(boolean useIdentityHashCode)
Deprecated.Sets whether to use the identity hash code.
- Parameters:
useIdentityHashCode
- the new useIdentityHashCode flag
-
isUseFieldNames
public boolean isUseFieldNames()
Deprecated.Gets whether to use the field names passed in.
- Returns:
- the current useFieldNames flag
-
setUseFieldNames
public void setUseFieldNames(boolean useFieldNames)
Deprecated.Sets whether to use the field names passed in.
- Parameters:
useFieldNames
- the new useFieldNames flag
-
isDefaultFullDetail
public boolean isDefaultFullDetail()
Deprecated.Gets whether to use full detail when the caller doesn't specify.
- Returns:
- the current defaultFullDetail flag
-
setDefaultFullDetail
public void setDefaultFullDetail(boolean defaultFullDetail)
Deprecated.Sets whether to use full detail when the caller doesn't specify.
- Parameters:
defaultFullDetail
- the new defaultFullDetail flag
-
isArrayContentDetail
public boolean isArrayContentDetail()
Deprecated.Gets whether to output array content detail.
- Returns:
- the current array content detail setting
-
setArrayContentDetail
public void setArrayContentDetail(boolean arrayContentDetail)
Deprecated.Sets whether to output array content detail.
- Parameters:
arrayContentDetail
- the new arrayContentDetail flag
-
getArrayStart
public java.lang.String getArrayStart()
Deprecated.Gets the array start text.
- Returns:
- the current array start text
-
setArrayStart
public void setArrayStart(java.lang.String arrayStart)
Deprecated.Sets the array start text.
null
is accepted, but will be converted to an empty String.- Parameters:
arrayStart
- the new array start text
-
getArrayEnd
public java.lang.String getArrayEnd()
Deprecated.Gets the array end text.
- Returns:
- the current array end text
-
setArrayEnd
public void setArrayEnd(java.lang.String arrayEnd)
Deprecated.Sets the array end text.
null
is accepted, but will be converted to an empty String.- Parameters:
arrayEnd
- the new array end text
-
getArraySeparator
public java.lang.String getArraySeparator()
Deprecated.Gets the array separator text.
- Returns:
- the current array separator text
-
setArraySeparator
public void setArraySeparator(java.lang.String arraySeparator)
Deprecated.Sets the array separator text.
null
is accepted, but will be converted to an empty String.- Parameters:
arraySeparator
- the new array separator text
-
getContentStart
public java.lang.String getContentStart()
Deprecated.Gets the content start text.
- Returns:
- the current content start text
-
setContentStart
public void setContentStart(java.lang.String contentStart)
Deprecated.Sets the content start text.
null
is accepted, but will be converted to an empty String.- Parameters:
contentStart
- the new content start text
-
getContentEnd
public java.lang.String getContentEnd()
Deprecated.Gets the content end text.
- Returns:
- the current content end text
-
setContentEnd
public void setContentEnd(java.lang.String contentEnd)
Deprecated.Sets the content end text.
null
is accepted, but will be converted to an empty String.- Parameters:
contentEnd
- the new content end text
-
getFieldNameValueSeparator
public java.lang.String getFieldNameValueSeparator()
Deprecated.Gets the field name value separator text.
- Returns:
- the current field name value separator text
-
setFieldNameValueSeparator
public void setFieldNameValueSeparator(java.lang.String fieldNameValueSeparator)
Deprecated.Sets the field name value separator text.
null
is accepted, but will be converted to an empty String.- Parameters:
fieldNameValueSeparator
- the new field name value separator text
-
getFieldSeparator
public java.lang.String getFieldSeparator()
Deprecated.Gets the field separator text.
- Returns:
- the current field separator text
-
setFieldSeparator
public void setFieldSeparator(java.lang.String fieldSeparator)
Deprecated.Sets the field separator text.
null
is accepted, but will be converted to an empty String.- Parameters:
fieldSeparator
- the new field separator text
-
isFieldSeparatorAtStart
public boolean isFieldSeparatorAtStart()
Deprecated.Gets whether the field separator should be added at the start of each buffer.
- Returns:
- the fieldSeparatorAtStart flag
- Since:
- 2.0
-
setFieldSeparatorAtStart
public void setFieldSeparatorAtStart(boolean fieldSeparatorAtStart)
Deprecated.Sets whether the field separator should be added at the start of each buffer.
- Parameters:
fieldSeparatorAtStart
- the fieldSeparatorAtStart flag- Since:
- 2.0
-
isFieldSeparatorAtEnd
public boolean isFieldSeparatorAtEnd()
Deprecated.Gets whether the field separator should be added at the end of each buffer.
- Returns:
- fieldSeparatorAtEnd flag
- Since:
- 2.0
-
setFieldSeparatorAtEnd
public void setFieldSeparatorAtEnd(boolean fieldSeparatorAtEnd)
Deprecated.Sets whether the field separator should be added at the end of each buffer.
- Parameters:
fieldSeparatorAtEnd
- the fieldSeparatorAtEnd flag- Since:
- 2.0
-
getNullText
public java.lang.String getNullText()
Deprecated.Gets the text to output when
null
found.- Returns:
- the current text to output when
null
found
-
setNullText
public void setNullText(java.lang.String nullText)
Deprecated.Sets the text to output when
null
found.null
is accepted, but will be converted to an empty String.- Parameters:
nullText
- the new text to output whennull
found
-
getSizeStartText
public java.lang.String getSizeStartText()
Deprecated.Gets the text to output when a
Collection
,Map
orArray
size is output.This is output before the size value.
- Returns:
- the current start of size text
-
setSizeStartText
public void setSizeStartText(java.lang.String sizeStartText)
Deprecated.Sets the start text to output when a
Collection
,Map
orArray
size is output.This is output before the size value.
null
is accepted, but will be converted to an empty String.- Parameters:
sizeStartText
- the new start of size text
-
getSizeEndText
public java.lang.String getSizeEndText()
Deprecated.Gets the end text to output when aCollection
,Map
orArray
size is output.This is output after the size value.
- Returns:
- the current end of size text
-
setSizeEndText
public void setSizeEndText(java.lang.String sizeEndText)
Deprecated.Sets the end text to output when a
Collection
,Map
orArray
size is output.This is output after the size value.
null
is accepted, but will be converted to an empty String.- Parameters:
sizeEndText
- the new end of size text
-
getSummaryObjectStartText
public java.lang.String getSummaryObjectStartText()
Deprecated.Gets the start text to output when an
Object
is output in summary mode.This is output before the size value.
- Returns:
- the current start of summary text
-
setSummaryObjectStartText
public void setSummaryObjectStartText(java.lang.String summaryObjectStartText)
Deprecated.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.- Parameters:
summaryObjectStartText
- the new start of summary text
-
getSummaryObjectEndText
public java.lang.String getSummaryObjectEndText()
Deprecated.Gets the end text to output when an
Object
is output in summary mode.This is output after the size value.
- Returns:
- the current end of summary text
-
setSummaryObjectEndText
public void setSummaryObjectEndText(java.lang.String summaryObjectEndText)
Deprecated.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.- Parameters:
summaryObjectEndText
- the new end of summary text
-
-