类 ToStringBuilder
java.lang.Object
cn.taketoday.core.style.ToStringBuilder
Utility class that builds pretty-printing
toString() methods
with pluggable styling conventions.- 从以下版本开始:
- 4.0
- 作者:
- Keith Donald, Juergen Hoeller
-
构造器概要
构造器构造器说明ToStringBuilder(Object obj) Create a ToStringBuilder for the given object.ToStringBuilder(Object obj, ToStringStyler styler) Create a ToStringBuilder for the given object, using the provided style.ToStringBuilder(Object obj, ValueStyler styler) Create a ToStringBuilder for the given object, using the provided style. -
方法概要
修饰符和类型方法说明Append the provided value.Append a boolean field value.Append a byte field value.Append a double field value.Append a float field value.Append a integer field value.Append a long field value.Append a short field value.Append a field value.static ToStringBuildertoString()Return the String representation that this ToStringBuilder built.
-
构造器详细资料
-
ToStringBuilder
Create a ToStringBuilder for the given object.- 参数:
obj- the object to be stringified
-
ToStringBuilder
Create a ToStringBuilder for the given object, using the provided style.- 参数:
obj- the object to be stringifiedstyler- the ValueStyler encapsulating pretty-print instructions
-
ToStringBuilder
Create a ToStringBuilder for the given object, using the provided style.- 参数:
obj- the object to be stringifiedstyler- the ToStringStyler encapsulating pretty-print instructions
-
-
方法详细资料
-
append
Append a byte field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append a short field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append a integer field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append a long field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append a float field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append a double field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append a boolean field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append a field value.- 参数:
fieldName- the name of the field, usually the member variable namevalue- the field value- 返回:
- this, to support call-chaining
-
append
Append the provided value.- 参数:
value- the value to append- 返回:
- this, to support call-chaining.
-
toString
Return the String representation that this ToStringBuilder built. -
from
-