SQiShER/java-object-diff

Introspect on fields (not on getters/setters)

pierre-sion opened this issue · 0 comments

Hi, thank you for this great library.

The documentation states in the "Introspection Configuration" section that "The default introspector internally uses the java.beans.Introspector which has some limitations. The most important one being that it only operates on getters and setters. In case field introspection is needed a custom introspector must be used"

I was wondering if such an introspector operating directly on fields has been made available, since it feels pretty like a "standard" feature (ala Jackson which handles both accessors and fields).
I also looked at the issue #92 "Introspecting private fields without getters", but implementing a custom introspector seems rather arduous. Quoting the issue: "I think doing so will involve writing your own Introspector, PropertyAwareAccessor and (probably) ElementSelector implementations".

Thank you, best regards.