Turning one annotation into many annotations with AspectJ

时光毁灭记忆、已成空白 提交于 2019-12-03 13:43:46

I received this answer from Andy Clement on the aspectj-users mailing list:

Hi,

I'm afraid you can't do that with AspectJ right now, you can't pass a piece of the matched information to the new annotation. I can perhaps imagine some hypothetical syntax:

declare @field: @SortedOneToMany(sort=SortType.COMPARATOR,comparator={1}) * * : @Sort(type=SortType.COMPARATOR,comparator={1});

which would seem to achieve what you want.

Maybe raise an enhancement request for it: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ

sorry I don't have better news.

cheers Andy

I created a ticket for the issue in case anyone wants to follow the progress: https://bugs.eclipse.org/bugs/show_bug.cgi?id=345515

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!