Module io.ebean.api
Package io.ebean.bean

Class ToStringBuilder

java.lang.Object
io.ebean.bean.ToStringBuilder

public final class ToStringBuilder extends Object
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).

  • Constructor Details

    • ToStringBuilder

      public ToStringBuilder()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • start

      public void start(Object bean)
      Set of an object being added.
    • add

      public void add(String name, Object value)
      Add a property as name value pair.
    • addRaw

      public void addRaw(String content)
      Add raw content.
    • end

      public void end()
      End of an object.
    • addMap

      public void addMap(Map<?,?> map)
    • addCollection

      public void addCollection(Collection<?> c)
      Add a collection of values.