[ 
https://ops4j1.jira.com/browse/QI-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15166#comment-15166
 ] 

Niclas Hedhman commented on QI-248:
-----------------------------------

Perhaps something for 2.0

Quick question; How is the AnnotationMapper implementation going to create a 
Qi4j annotation? IIRC, they can't be instantiated.

> AnnotatonMapper in order to better create Qi4j-agnostic applicatons
> -------------------------------------------------------------------
>
>                 Key: QI-248
>                 URL: https://ops4j1.jira.com/browse/QI-248
>             Project: Qi4j
>          Issue Type: New Feature
>          Components: API, Core Runtime, SPI
>    Affects Versions: 1.1
>         Environment: Any environment capable of running Qi4j-application.
>            Reporter: Stanislav Muhametsin
>             Fix For: Unknown
>
>
> I have currently very Qi4j-agnostic application. However, some things make me 
> still include Qi4j in dependencies. Those are annotations - namely 
> constraints and concern-tags. Thus it would be handy if I could have my own 
> "constraint" and "concern" annotation tags, and then implementation layer, 
> which is the one using Qi4j, could map each such annotation into Qi4j 
> annotation.
> Proposal: ApplicationAssembly could have "public void 
> setAnnotationMapper(AnnotationMapper mapper);" method. The interface 
> AnnotationMapper could be following:
> {code}
> public interface AnnotationMapper
> {
>   public void Annotation mapAnnotation(Annotation encounteredAnnotation);
> }
> {code}
> So every time Qi4j bootstrap encounters a method with unknown (non-Qi4j) 
> annotation tags, and possibly any method parameter with unknown (non-Qi4j) 
> tags, it will ask the possible AnnotationMapper whether it could map the 
> non-Qi4j annotation into Qi4j-annotation. If it can't, it should return the 
> same annotation as given to the mapAnnotation method. Returning null would be 
> considered error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to