You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Jackson Mr Bean module to construct impl classes for defined interfaces. It works great, but one problem is that it does not generate an (overridden) implementation of toString() in the impl class resulting in the inability to use it for logging.
I worked around it by using default methods, but it would be nice to have that support.
Thanks
Muthu
The text was updated successfully, but these errors were encountered:
That sounds like a good improvement idea. There are couple of open questions that'd have to be defined:
Applicability: strict (only if toString() explicitly overridden as "abstract" to indicate it should be generated) or looser (if abstract or if target is interface)? Or something more customizable (specifically should not override explicit implementation from something above java.lang.Object, I assume?)
Implementation: what would be usable implementation, how to configure? Use a templating of some kind? (generation code does not have very good understanding of POJO semantics so it cannot implement much of logic, and toString() specifically is passed no context of any kind so it cannot serialize as json or call any Jackson functionality)
Hello Folks,
I am using Jackson Mr Bean module to construct impl classes for defined interfaces. It works great, but one problem is that it does not generate an (overridden) implementation of toString() in the impl class resulting in the inability to use it for logging.
I worked around it by using default methods, but it would be nice to have that support.
Thanks
Muthu
The text was updated successfully, but these errors were encountered: