JWeaver is a simple, zero-decision Java utility for generating human-readable,
structured string representations of objects. It eliminates the need to write
custom toString() methods while producing consistent, safe, and readable output.
For most users, weaving an object is as easy as:
Person person = new Person("John Doe", "1990-01-01");
System.out.println(JWeaver.weave(person));What happens automatically
- Small objects → compact one-line output
- Large or nested objects → structured tree output
- Collections → limited to a safe number of elements
- Circular or reciprocal references are detected
- Sensitive fields (password, token, etc.) are automatically ignored
No builder, no configuration, no thinking required.
Example output:
Person[name=John Doe, birthday=1990-01-01]Add JWeaver to your Maven project:
Maven
<dependency>
<groupId>com.robinloom</groupId>
<artifactId>jweaver</artifactId>
<version>1.1.0</version>
</dependency>Gradle
implementation 'com.robinloom:jweaver:1.1.0'
- Removes boilerplate toString() implementations
- Ensures consistent, readable, and safe output
- Works out-of-the-box for simple usage
- Allows advanced configuration for power users