AspectWerkz supports the following features
This is a very incomplete list, see the documentation for all features.
-
Very high-performant. Weaved code is entirely statically compiled.
AspectWerkz ranks 1st or 2nd in most of the benchmarks. Read more about the figures
on the AspectWerkz Bench project pages.
-
Annotation support: Matching on annotations (both JavaDoc and JSR-175). Supports user-defined annotations,
retrieval of annotations. Both JavaDoc and JSR-175 annotations are accessed through one
single API and both schemes are strongly typed.
-
Aspects, advices and introductions are written in plain old
Java code. I.e. no new language to learn, no new compilation
phases, no need to tell your manager ;-). Will work seamlessly in
any IDE, debugger, refactoring tool and test framework.
-
The target classes can be regular POJOs (Plain Old Java
Objects), i.e. do not require to have an interface.
-
Weaving (bytecode modification) at compile time, load time and runtime.
Hooks in and transforms classes loaded by
any class loader
except the bootstrap class loader. Which basically means that
you can easily transform any (legacy) application or external
library apart from rt.jar both at runtime and compile time.
JSR-163 JVMTI
is supported for Java 1.5 usage as well.
-
The join point model supports: staticinitialization, method execution and call, constructor execution and call,
field access, field modification, catch handlers, cflow, within and withincode, hasmethod and hasfield. All advice works with all join points.
-
Rich semantics allow to access runtime information about the join point within the advice using regular types without any
casting or object array access. Reflective access to runtime information is also possible.
-
Introductions/Inter type declarations (also called Mixins), i.e. the possibility
to add interfaces and implementations to existing classes.
-
META-INF/aop.xml container: Support for deploying several
aop.xml
Aspect defintion/deployment files alongside deployed
application (
WEB-INF/aop.xml
,
META-INF/aop.xml
) and have them following
the classloader hierarchy.
-
Annotation definition. Define your aspects and mixins using annotations using wether standardized Java 5 Annotations
(JSR-175) or Java 1.3/1.4 custom doclet with strongly typed access.
-
XML definition. Define your aspects and mixins using XML. The XML definition can also be used to refine,
override and resolve the annotation definition.
-
Pluggable aspect manager that can make it work seamlessly with IoC frameworks like Spring
or PicoContainer.
-
Support several different deployment models (scope) for aspects (perJVM(singleton), perClass, perInstance)
and for mixin (perInstance, perClass, perJVM(singleton)).
-
Hot deployment, aspects can be deployed and undeployed at runtime using a simple API.
-
Fine-grained pattern language for selecting the join points.
-
Highly orthogonal underlying model. All advice works with all join points and pointcut composition
supports mixing all kinds of pointcuts.
-
"Offline" transformation (can be used as a post-processor).
-
Support for passing configuration parameters to the advices through
the definition.
-
Simple usage and configuration.
-
Extensible container architecture allows to run any Aspects (AspectWerkz, Spring AOP, AOP Alliance, subset of AspectJ)
within the AspectWerkz runtime.