Class BulletWeaver

java.lang.Object
com.robinloom.jweaver.bullet.BulletWeaver
All Implemented Interfaces:
Weaver

public class BulletWeaver extends Object implements Weaver
BulletWeaver generates a string representation for a given object by arranging the object information (class name, field names, values) in a list with indented items.

Example:

Person
 - name=John Doe
 - birthday=1990-01-01
  • Constructor Details

    • BulletWeaver

      public BulletWeaver()
  • Method Details

    • weave

      public String weave(Object object)
      Specified by:
      weave in interface Weaver
    • weave

      public String weave(Object object, Mode mode)
      Generates a string representation of the given object via reflections. Prints the class name followed by every accessible field in a list structure. For JDK classes, a regular toString() result is returned. Detects reciprocal and circular object dependencies.
      Specified by:
      weave in interface Weaver
      Parameters:
      object - object to generate a string representation for
      Returns:
      a well-structured, human-readable representation of that object