Class org.as2lib.aop.weaver.SimpleWeaver

org.as2lib.core.BasicClass
   +--org.as2lib.aop.weaver.SimpleWeaver

Implemented Interfaces

Weaver

Description

SimpleWeaver is a simple implementation of the Weaver interface that supports most needed functionalities.

Method Index

new SimpleWeaver()

addAdvice(), addAdviceForAllTypes(), addAdviceForAllTypesInPackage(), addAdviceForMultipleAffectedTypes(), addAdviceForOneAffectedType(), addAspect(), addAspectForAllTypes(), addAspectForAllTypesInPackage(), addAspectForMultipleAffectedTypes(), addAspectForOneAffectedType(), weave()

Inherited from BasicClass

toString()

Constructor Detail

SimpleWeaver

public function SimpleWeaver(Void)

Constructs a new SimpleWeaver instance.

Method Detail

weave

public function weave(Void):Void

Weaves the added aspects and advices into the affected types.

Specified By

weave() in org.as2lib.aop.Weaver

addAspect

public function addAspect():Void

addAspectForAllTypes

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.

Parameters

aspectthe aspect whose advices shall be woven-into captured join points

addAspectForAllTypesInPackage

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.

Parameters

aspectthe aspect whose advices shall be woven-into captured join points
affectedPackagethe package to search for matching join points

addAspectForMultipleAffectedTypes

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.

Parameters

aspectthe aspect whose advices shall be woven-into captured join points

addAspectForOneAffectedType

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.

Parameters

aspectthe aspect whose advices shall be woven-into captured join points
affectedTypethe affected type to search for join points

addAdvice

public function addAdvice():Void

addAdviceForAllTypes

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.

Parameters

advicethe advice to weave-into matching join points

addAdviceForAllTypesInPackage

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.

Parameters

advicethe advice to weave-into captured join points

addAdviceForMultipleAffectedTypes

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.

Parameters

advicethe advice to weave-into captured join points

addAdviceForOneAffectedType

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.

Parameters

advicethe advice to weave-into captured join points
affectedTypethe affected type to search for join points