io.ebean.bean.ToStringBuilder Maven / Gradle / Ivy
package io.ebean.bean;
import java.util.Collection;
import java.util.IdentityHashMap;
import java.util.Map;
/**
* Helps build toString content taking into account recursion.
*
* That is, it detects and handles the case where there are relationships that recurse
* and would otherwise become an infinite loop (e.g. bidirectional parent child).
*/
public final class ToStringBuilder {
/**
* The max number of objects that we allow before stopping content being appended.
*/
private static final int MAX = 100;
/**
* Max length of content in string form added for any given value.
*/
private static final int TRIM_LENGTH = 500;
/**
* The max total content after which we stop content being appended.
*/
private static final int MAX_TOTAL_CONTENT = 2000;
private final IdentityHashMap
© 2015 - 2024 Weber Informatics LLC | Privacy Policy