|
SCoPE is an extended AspectJ compiler that optimizes conditional pointcuts (i.e. if pointcuts). With SCoPE compiler, you can write expressive pointcuts within standard AspectJ language without runtime overheads. With SCoPE compiler, the following advice declaration, which adds extra behavior to calls to methods with only lower case characters, runs without runtime overheads: before(): call(* *) && if(thisJoinPoint.getSignature().getName().matches("^[a-z]+$")){
...
}
Note that the advice uses if pointcut to identify method names. With standard AspectJ compilers, the expression in the if pointcut is evaluated everytime a method is called in a program. The SCoPE compiler recognizes that the pointcut statically matches specific method call expressions in the program, and weaves advice directly before matching calls. More examples can be found here. Implementation †SCoPE is currently built on top of abc, the <nop>AspectBench Compiler for AspectJ. We greatly thank the members of this project for releasing such a nice implementation. Current implementation of the SCoPE compiler is available here. People †
Papers †
Related Projects †
|