TypeSafe invocation of a method on a target object based on a method exposed from a example
class. It is presumed the two share the same method signatures.
This utility requires that the reference object can be subclassed dynamically. As such, it must
have a zero arg constructor and the class definition must not be final. Also, the utility is
aware of complex Object graphs and can safely traverse nested structures via the sample API. This
can lead to deeper, proxied objects that share the same behavior. However, the utility is only
aware of several types of references during traversal that will allow it to deep proxy: an
instance variable type, a generic collection type, and generic map key/value types. Lastly, the
utility expects the target object(s) to implement
ReferenceAware
in order to ascertain
when a target object (or nested object) requires proxy creation. Be aware of these caveats as you
consider using this utility.
This utility is oft used to interact with auto-generated projections based on methods exposed in
the originating domain class.