Gotchas:
If you are updgrading from a version earlier then:
Latest public build detailed information: Click here. See also for known limitations and bugs of current version.
Aspect beans (i.e. the global class which defines the hooks) can now define a non default constructor. This constructor can be explicitly invoked from the connector, allowing customization of the global aspect bean instance. The following code fragment illustrates an aspect bean and connector which explicitly instantiates this aspect bean:
class Test { public Test(String var) {} hook testHook { ... } } connector TestConnector { Test test = new Test("a custom string"); Test.test hookInstance = new Test.test(* *.*(*)); }
Good to know:
The return type of around, around returning and around throwing equals the type declared by the abstract method parameter of the hook’s constructor. Likewise, the return type of all three proceed alternatives also equals the same type.
For example, the following code is possible now without casting:
class Test { hook testHook { testHook(int method(..args)) {...} around() { int k = proceed(); return k*2; } } }
Good to know:
JAsCo now supports a true distributed setup that has very powerful distributed features. Aspects can intercept joinpoints executing on other hosts and are also able to execute their advices on other hosts.
More info coming soon!
Up till now, the only way to exclude classes from weaving is by listing them as a jvm launch option. JAsCo now supports an annotation that can be placed on all java elements to exclude it from weaving:
jasco.runtime.annotation.NoJAsCoAOP
e.g. when supplying a class X with this annotation, JAsCo will never touch it.
e.g. when supploying method y of class X with is annotation, JAsCo will never touch method y, but might weave other methods of class X