Class JWeaver
java.lang.Object
com.robinloom.jweaver.JWeaver
Central entry point of the JWeaver API.
JWeaver provides a simple, zero-decision way to generate human-readable
string representations of arbitrary Java objects using reflection.
It is designed as a drop-in replacement for handwritten toString()
implementations.
The default weave(Object) method uses the Mode.INLINE mode,
which produces a compact, single-line representation suitable for logging
and debugging. Alternative output styles can be selected explicitly via
weave(Object, Mode).
Internally, JWeaver selects an appropriate Weaver implementation
based on the chosen Mode. Circular object references are detected
automatically to ensure safe output.
This class is intentionally non-instantiable and exposes only static convenience methods.
- See Also:
-
Method Summary
-
Method Details
-
weave
Generates a string representation of the given object using the defaultMode.INLINEmode.- Parameters:
object- the object to generate a string representation for- Returns:
- a human-readable string representation of the given object
-
weave
Generates a string representation of the given object using the specifiedMode.- Parameters:
object- the object to generate a string representation formode- the output mode controlling structure and level of detail- Returns:
- a human-readable string representation of the given object
-