MCPcopy
hub / github.com/google/guava / toStringHelper

Method toStringHelper

guava/src/com/google/common/base/MoreObjects.java:115–117  ·  view source on GitHub ↗

Creates an instance of {@link ToStringHelper}. <p>This is helpful for implementing {@link Object#toString()}. Specification by example: {@snippet : // Returns "ClassName{}" MoreObjects.toStringHelper(this) .toString(); // Returns "ClassName{x=1}" MoreObjects.toStringHelper(this) .add("x",

(Object self)

Source from the content-addressed store, hash-verified

113 * @since 18.0 (since 2.0 as {@code Objects.toStringHelper}).
114 */
115 public static ToStringHelper toStringHelper(Object self) {
116 return new ToStringHelper(self.getClass().getSimpleName());
117 }
118
119 /**
120 * Creates an instance of {@link ToStringHelper} in the same manner as {@link

Callers 15

toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95
toStringMethod · 0.95

Calls 1

getSimpleNameMethod · 0.45