is there library that pretty prints java or kotlin...
# announcements
c
is there library that pretty prints java or kotlin objects via reflection? something like http://www.lihaoyi.com/PPrint/
n
i did that by myself once might be a bad idea especially if objects are related with a two-way relationship then it never ends or the logic to make it work is stateful not great either
m
if you work with
data class
the print is really well
☝️ 1
like PPRint
kotlin already do a nice print of fields in data classes
c
i just want to know if there is something. maybe i write one if there isnt.
m
I think for kotlin it's don't needed, due the fact of data classes already do it for you
They have hashcode and equals builders also
h
How about Lombok? It has nice
@Equals
and
@Value
annotations and minimises code in Java
c
well i just wanted something like `pp`in ruby for usage in the console and debugging. so it should just work with in any object, also jdk objects.
and maybe its a fun little open source library, but first i want to know whats already available.
but `ReflectionToStringBuilder`is basically exactly that. just didnt occur to me that i can use it from outside a class