Hi Carsten,

On Thu, Jul 4, 2013 at 8:56 AM, Carsten Ziegeler <[email protected]> wrote:
> ...For now I'm against committing this to trunk, as previously mentioned I
> would prefer having a build time annotation. If this is not possible, then
> the annotation and the AdapterProvider should be in the same package as
> there is no use case for using one without the other....

Yes, I was actually wondering about putting the annotation and
AdapterProvider in the org.apache.sling.adapter bundle instead of
sling.api.

That's slightly inconsistent with having the AdapterFactory in the
sling.api bundle, but we can rightly consider these new interfaces as
being adapter extensions, WDYT?.

OTOH I don't like @Adapter being a build-time only annotation - by
doing this you either tie people to Maven, or have to provide
build-time extensions for all common build tools (Maven, ant
command-line etc) which is a lot of work for such a simple feature. If
you want to create a build-time tool in addition why not, but I don't
want to make this build-time only. If you compare with declarative
services, the build-time plugin is very useful but you can also
perfectly work without it.

>
> One solution for a build time annotation would be to define a server
> registration property for a AdapterProvider containing the method names...

That's much more complicated to write than just an @Adapter annotation
on a method.

-Bertrand

Reply via email to