After two weeks of Ruthless Refactoring (TM) I can now announce that AspectWerkz version 0.6.3 has been released.
I have among other things rewritten the whole definition and weave model implementation to support a much more powerful join point model. The join point model now have the essence of the AspectJ model.
Here are some of the features/changes:
Completely new definition model. Aspects, advices, introductions and pointcuts are now completely orthogonal and the model now has the essence of the AspectJ model. See the documentation for details.
Abstract aspects definitions as well as pointcut expressions(e.g.((pc1 OR pc2) AND !pc3) and similar).
Multiple weave models.
Multiple AspectWerkz system can run in the same JVM concurrently.
setField and getField now works for get and set java.util.* collection fields (e.g. add/get/remove/size and so on).
Advice and introduction container is now pluggable. I.e. the user can provide its own custom implementation (f.e. to enable persistence).
The transparent persistence of advices and introductions have been moved to the sandbox.
Many bug fixes.
Here is an example of the new definition:
<aspectwerkz><!-- ============================================= --><!-- Define the advices --><!-- ============================================= --><advice-defname="log"advice="advices.LoggingAdvice"deployment-model="perInstance"/><advice-defname="cache"advice="advices.CachingAdvice"deployment-model="perClass"/><advice-defname="persistent"advice="advices.PersistenceAdvice"deployment-model="perJVM"/><advices-defname="log_and_cache"><advice-refname="log"/><advice-refname="cache"/></advices-def><!-- ============================================= --><!-- Define the introductions --><!-- ============================================= --><introduction-defname="serializable"interface="java.io.Serializable"/><introduction-defname="mixin"interface="mixins.Mixin"implementation="mixins.MixinImpl"deployment-model="perInstance"/><!-- ============================================= --><!-- Define the abstract aspects --><!-- ============================================= --><abstract-aspectname="MyAbstractAspect"><advicepointcut="setters AND !getters"><advices-refname="log_and_cache"/></advice><advicepointcut="persistentFields"><advice-refname="persistent"/></advice></aspect><!-- ============================================= --><!-- Define the aspects --><!-- ============================================= --><aspectname="MyAspect"extends="MyAbstractAspect"><introductionclass="domain.*"><introduction-refname="serializable"/><introduction-refname="mixin"/></introduction><pointcut-defname="setters"type="method"pattern="String domain.*.set*(..)"/><pointcut-defname="getters"type="method"pattern="String domain.*.get*(..)"/><pointcut-defname="persistentFields"type="setField"pattern="* domain.*.*"></aspect></aspectwerkz>
You can download the new release from the releases page
Enjoy.