From fa21e62717f87e3f84b74dcedc36d79951ec0751 Mon Sep 17 00:00:00 2001 From: avasseur Date: Thu, 27 Oct 2005 11:43:16 +0000 Subject: [PATCH] impl and test for dec precedence in aop.xml without extends --- docs/devGuideDB/ltw.xml | 32 ++++++++- .../loadtime/ConcreteAspectCodeGen.java | 40 +++++++---- .../loadtime/definition/Definition.java | 10 ++- .../loadtime/definition/DocumentParser.java | 7 +- .../ataspectj/ConcreteAtAspectTest.java | 10 +++ .../ConcretePrecedenceAspectTest.java | 69 +++++++++++++++++++ .../aop-concreteprecedenceaspect.xml | 12 ++++ .../ajc150/ataspectj/AtAjLTWTests.java | 4 ++ .../systemtest/ajc150/ataspectj/ltw.xml | 8 +++ 9 files changed, 173 insertions(+), 19 deletions(-) create mode 100644 tests/java5/ataspectj/ataspectj/ConcretePrecedenceAspectTest.java create mode 100644 tests/java5/ataspectj/ataspectj/aop-concreteprecedenceaspect.xml diff --git a/docs/devGuideDB/ltw.xml b/docs/devGuideDB/ltw.xml index 45c98d712..d3d9636b2 100644 --- a/docs/devGuideDB/ltw.xml +++ b/docs/devGuideDB/ltw.xml @@ -354,8 +354,37 @@ // here we are using a singleton aspect AbstractAspect concreteInstance = Aspects.aspectOf(myConcreteAspectClass); ]]> - + + + Using Concrete Aspects to define precedence + + As described in the previous section, the concrete-aspect element in + META-INF/aop.xml gives the option to declare the precedence, just as + @DeclarePrecedence or declare precedence do in + aspect source code. + + + Sometimes it is required to declare precedence without extending any abstract aspect + as well. For such a need, it is possible to use the concrete-aspect + element without the extends attribute and without any + pointcut nested element, but only with a precedence + attribute. + Consider the following: + + + + + ]]> + + This deployment time declaration is only defining a precedence rule. You have to remember + that the name attribute must be a valid fully qualified class name + that will be then reserved for this concrete-aspect and must not conflict with other classes + you deploy. + +