[ 
https://issues.apache.org/jira/browse/SLING-3499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003052#comment-14003052
 ] 

Konrad Windszus commented on SLING-3499:
----------------------------------------

Hi [~justinedelson], my intent was to make it possible to define defaults also 
within the custom annotations. I didn't leverage that for my custom 
annotations, because it is just a lot of effort due to type limitations on 
annotation attributes 
(http://stackoverflow.com/questions/1458535/which-types-can-be-used-for-java-annotation-members).
 Therefore I decided to still leverage the default annotation for that. 
Otherwise a lot of boilerplate code would be necessary, which wouldn't add too 
much value IMHO.
I still would leave it within the annotation processor, because I can image 
that there might be use cases for that (in other annotations).

> Support custom annotations with Sling Models
> --------------------------------------------
>
>                 Key: SLING-3499
>                 URL: https://issues.apache.org/jira/browse/SLING-3499
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>    Affects Versions: Sling Models API 1.0.0, Sling Models Implementation 1.0.2
>            Reporter: Konrad Windszus
>
> To support custom annotations the API needs to be extended. 
> The reasons for custom annotations are listed in 
> http://www.mail-archive.com/dev%40sling.apache.org/msg27918.html. Also it is 
> much more comfortable for developers, since they can use code completion in 
> the IDE to see which options are available for each injector-specific 
> annotation, apart from that it is less code to write (instead of multiple 
> annotations on one field/method I would only have to write one annotation 
> with some attributes).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to