Class TreeWeaver
java.lang.Object
com.robinloom.jweaver.tree.TreeWeaver
- All Implemented Interfaces:
Weaver
TreeWeaver depicts a given object and its fields as a tree.
This representation is particularly suitable for nested objects.
After setting up the tree structure, it is traversed in a depth-first search.
The object string is built while traversing the tree.
Example:
Person |-- name=John Doe `-- birthday=1990-01-01
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TreeWeaver
public TreeWeaver()
-
-
Method Details
-
weave
-
weave
Generates a string representation of the given object via reflections. Prints the class name followed by every accessible field in a tree structure. For JDK classes, a regulartoString()result is returned. Detects reciprocal and circular object dependencies.
-