Hi,
Following up on Olaf Otto's excellent suggestions for simpler/cleaner
adapters at CQCon, I have created a prototype (in my whiteboard) that
handles @AdapterMethod annotations - you basically just need to
annotate a method like
@AdapterMethod
public Bar adaptToBar(Foo f) { ... }
in a service that implements the (empty) AdapterMethodsProvider
interface, to provide a Foo to Bar adapter.
See SLING-2938 for details, [1] has two examples of
AdapterMethodsProvider services.
Feedback is welcome.
-Bertrand
[1]
https://svn.apache.org/repos/asf/sling/whiteboard/bdelacretaz/adapter-methods/extensions-adapter/src/test/java/org/apache/sling/adapter/internal/AdapterMethodManagerIT.java