org.as2lib.core.BasicClass +--org.as2lib.aop.weaver.SimpleWeaver
Weaver
SimpleWeaver
is a simple implementation of the Weaver
interface that
supports most needed functionalities.
new SimpleWeaver()
public function weave(Void):Void
Weaves the added aspects and advices into the affected types.
public function addAspectForAllTypes(aspect:Aspect):Void
Adds the given aspect
for all types. This means that all types are
searched through starting from the default or root package and checked whether
their join points match any of the advices of the aspect
.
aspect | the aspect whose advices shall be woven-into captured join points |
public function addAspectForAllTypesInPackage(aspect:Aspect, affectedPackage:Object):Void
Adds the given aspect
for the types that are directly members of the
given affectedPackage
or any sub-package. All these types are regarded
as affected types that are searched through for matching join points.
aspect | the aspect whose advices shall be woven-into captured join points |
affectedPackage | the package to search for matching join points |
public function addAspectForMultipleAffectedTypes(aspect:Aspect, affectedTypes:Array):Void
Adds the given aspect
for the types that are contained in
affectedTypes
. The affectedTypes
array is supposed to hold
elements of type Function
.
aspect | the aspect whose advices shall be woven-into captured join points |
public function addAspectForOneAffectedType(aspect:Aspect, affectedType:Function):Void
Adds the given aspect
for the given affectedType
. Only the given
affectedType
is searched through when searching for join points that may
match the advices of the given aspect
.
aspect | the aspect whose advices shall be woven-into captured join points |
affectedType | the affected type to search for join points |
public function addAdviceForAllTypes(advice:Advice):Void
Adds the given advice
for all types. This means that all types are
searched through starting from the default or root package and checked whether
their join points match any of the advices of the advice
.
advice | the advice to weave-into matching join points |
public function addAdviceForAllTypesInPackage(advice:Advice, package:Object):Void
Adds the given advice
for the types that are directly members of the
given affectedPackage
or any sub-package. All these types are regarded
as affected types that are searched through for matching join points.
advice | the advice to weave-into captured join points |
public function addAdviceForMultipleAffectedTypes(advice:Advice, affectedTypes:Array):Void
Adds the given advice
for the types that are contained in
affectedTypes
. The affectedTypes
array is supposed to hold
elements of type Function
.
advice | the advice to weave-into captured join points |
public function addAdviceForOneAffectedType(advice:Advice, affectedType:Function):Void
Adds the given advice
for the given affectedType
. Only the given
affectedType
is searched through when searching for join points that may
match the given advice
.
advice | the advice to weave-into captured join points |
affectedType | the affected type to search for join points |