AnnotatonMapper in order to better create Qi4j-agnostic applicatons
-------------------------------------------------------------------
Key: QI-248
URL: http://issues.ops4j.org/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
Assignee: Rickard Öberg
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:
public interface AnnotationMapper
{
public void Annotation mapAnnotation(Annotation encounteredAnnotation);
}
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.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.ops4j.org/secure/Administrators.jspa
-
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