MCPcopy Create free account
hub / github.com/antlr/codebuff / toString

Method toString

output/java_guava/1.4.18/Objects.java:410–427  ·  view source on GitHub ↗

Returns a string in the format specified by Objects#toStringHelper(Object). After calling this method, you can keep adding more properties to later call toString() again and get a more complete representation of the same object; but properties cannot be removed, so this only allows limit

()

Source from the content-addressed store, hash-verified

408 */
409
410 @Override
411 public String toString() {
412 // create a copy to keep it consistent in case value changes
413 boolean omitNullValuesSnapshot = omitNullValues;
414 String nextSeparator = "";
415 StringBuilder builder = new StringBuilder(32).append(className).append('{');
416 for (ValueHolder valueHolder = holderHead.next; valueHolder != null; valueHolder = valueHolder.next) {
417 if (!omitNullValuesSnapshot || valueHolder.value != null) {
418 builder.append(nextSeparator);
419 nextSeparator = ", ";
420 if (valueHolder.name != null) {
421 builder.append(valueHolder.name).append('=');
422 }
423 builder.append(valueHolder.value);
424 }
425 }
426 return builder.append('}').toString();
427 }
428
429 private ValueHolder addHolder() {
430 ValueHolder valueHolder = new ValueHolder();

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected