Community
Participate
Working Groups
Spin off of Bug 359159 - this bug is to cover supporting declare annotation in aop.xml
implemented declare annotation for method/field: <concrete-aspect name="ConjuredUp"> <declare-annotation method="* Hello.sayHello(..)" annotation="@Anno"/> </concrete-aspect> <concrete-aspect name="ConjuredUp"> <declare-annotation field="int i" annotation="@Anno(35)"/> </concrete-aspect> <concrete-aspect name="ConjuredUp"> <declare-annotation field="int i" annotation="@Anno(something=false)"/> </concrete-aspect> Notice named values are supported for annotation values. All annotation value types are supported *except* arrays or annotations. declare annotation targeting a type is also not supported at the moment. Note: in order that double quotes don't require writing as " in the XML, it is OK to use single quotes for string values: <declare-annotation field="int i" annotation="@Anno(message='hello world')"/>
After a few days of testing everything works as expected. Thanks again. Could you make a statement how hard it would be to implement declaring annotations targeting a type (like annotate a class). In our use case marker annotations for classes/types would be enough.
targetting a type would be trivial as the infrastructure is all there now. let me try to fit it into 1.7. thanks a lot for the feedback on the feature.
so is there a chance to see another dev build with this feature before 1.7? that would be nice! of course we would test this feature and provide an appropriate feedback.
dev build now available here: http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/dev/aspectj-DEVELOPMENT-20120411173900.jar this supports: <declare-annotation type="Foo*" annotation="@Anno"/> I only added one regression test for it, so any extra testing you could do would be great.
unsetting the target field which is currently set for something already released