From de7f2892de50d92f11c73fb4c89dfabd02f7f748 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 3 Oct 2011 23:54:02 +0000 Subject: 1.6.12.RC1 --- docs/dist/doc/README-1612.html | 62 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/dist/doc/README-1612.html b/docs/dist/doc/README-1612.html index 05a4bbcf2..f57be379c 100644 --- a/docs/dist/doc/README-1612.html +++ b/docs/dist/doc/README-1612.html @@ -23,13 +23,71 @@ All rights reserved.

The full list of resolved issues in 1.6.12 is available here.

- +

1.6.12.RC1 available 3-Oct-2011

1.6.12.M2 available 18-Aug-2011

1.6.12.M1 available 7-Jun-2011

-

Notable Changes

+

RC1 - annotation value matching and !=

+

+Prior to this change it was only possible to specify an annotation match like this:

+get(@Anno(someValue=1) * *) || get(@Anno(someValue=3) * *)
+

Now it is possible to use != and write this:

+get(@Anno(someValue!=2) * *)
+

This can enable a group of annotated elements to be more easily identified.
+
+ + +

RC1 - More flexible pointcut/code wiring in aop.xml

+

+Prior to this version the wiring was quite limited. In order to wire a pointcut to a piece of code the user +needed to write an abstract aspect that included an abstract pointcut and some advice attached to that +abstract pointcut. Then compile this aspect and finally write the XML to concretize the abstract pointcut. With 1.6.12 +more flexibility has been added and for some cases there can be no need for that abstract aspect. +

This is a work in progress but now you can write this in the aop.xml: +


+<concrete-aspect name="MyAspect">
+  <before pointcut="execution(* Hello.say2(..)) AND args(message)"
+   invokeClass="SomeRegularJavaClass" 
+   invokeMethod="someMethod(JoinPoint tjp, java.lang.String message)"/>
+  <after pointcut="execution(* Hello.say2(..)) AND args(message)"
+   invokeClass="SomeRegularJavaClass" 
+   invokeMethod="someOtherMethod(JoinPoint tjp, java.lang.String message)"/>
+</concrete-aspect>
+
+public class SomeRegularJavaClass {
+
+  public static void someMethod(org.aspectj.lang.JoinPoint tjp, String s) {
+    System.out.println("in advice4: s="+s+" at "+tjp);
+  }
+  
+  public static void someOtherMethod(org.aspectj.lang.JoinPoint tjp, String s) {
+    System.out.println("in advice5: s="+s+" at "+tjp);
+  }
+}
+
+

In this example there is a simple regular java class containing some static methods. In the XML these +can be joined to pointcuts, kind as if they were advice. Notice in the XML it specifies: +

+

+Due to the method specification being in XML the parameter types must be fully specified. The only +exception to this rule is that the AspectJ core types JoinPoint (and JoinPoint.StaticPart) do not +have to be fully qualified (see the example above). +Important: notice that in the case above which does argument binding, the names are +bound according to the XML specification, not according to the parameter names in the Java code. +

Around advice is also supported (the return type of the method must match the joinpoint return +type). The example shows after advice, currently there is no way to specify either after returning +or after finally, there is only after. +

Expanding this further would enable support for all the code style features in the XML. Some +of the language features like declare annotation cannot be done in annotation style aspects but the +XML doesn't have the same kind of restrictions. If anyone wants to help out by fleshing this area +of the weaver out, let me know and I'll help you get started! +


M2 - thisAspectInstance (bug239649)

-- cgit v1.2.3