This project is a library for any POJO class to implement a toString method without actually writing any implementation.
@Override
public String toString() {
return Utilities.toString(this);
}
The above will print the following output on a HelloToString class:
Addresses = [Bangalore, Karnataka, India], Id = 1, Name = Triguna, Now = 2021-9-4 13:56:37.967,
Time taken to use toString method = 0.019 ms
Given a class name and instance, the project will use the reflection from Java to fetch the getter methods for the given instance and execute it to print the methodName = methodValue
in an appended string with comma-separated values.
This is a very generic implementation so anybody can use this code to write their toString implementation. The idea is to avoid implementing toString by writing your own implementation every time.
Please put your thoughts on the implementation so we can evolve as a project which will help every Java Developer.
Refer to Reviews from various stakeholders
Refer to Usage Guide for more details on the usage.