Interface org.as2lib.aop.JoinPoint

org.as2lib.core.BasicInterface
   +--org.as2lib.aop.JoinPoint

Description

JoinPoint represents an identifiable point in a program. Although this points could by theory also be try..catch blocks, the join points offered by this framework are limited to members of classes or interfaces, these are methods and properties.

Method Index

getInfo(), getThis(), getType(), matches(), proceed(), snapshot(), update()

Inherited from BasicInterface

toString()

Method Detail

getInfo

public function getInfo(Void):TypeMemberInfo

Returns the info of the represented type member; this information is also known as the join point's static part. Note that the type of this join point is also part of this join point's static part.

Return

the info representing the static part of this join point

proceed

public function proceed(args:Array)

Executes the type member represented by this join point passing the given args and returns the result.

Parameters

argsthe arguments to use for the execution

Return

the result of the type member execution

getThis

public function getThis(Void)

Returns the logical this of the interception. This means if this join point is part of a call-pointcut the result will refer to the object where the call was made from. If this join point is part of an execution-, set- or get-pointcut the result will refer to the object that represented method or property resides in.

Return

the logical this of this join point depending on the used pointcut

getType

public function getType(Void):Number

Returns the type of the join point.

Supported types are declared as constants in the AbstractJoinPoint class.

Return

the type of this join point

matches

public function matches(pattern:String):Boolean

Checks if this join point matches the given pattern. Depending on the used matcher the pattern may contain wildcards like "*" and "..". A pattern could for example be "org..BasicClass.*".

Parameters

patternthe pattern to match against this join point

Return

true if the given pattern matches this join point else false

update

public function update(thiz):JoinPoint

Returns a copy of this join point with an updated logical this. This join point is left unchanged.

Parameters

thizthe new logical this

Return

a copy of this join point with an updated logical this

snapshot

public function snapshot(Void):JoinPoint

Returns a copy of this join point that reflects its current state.

It is common practice to create a new join point for a not-fixed method info. This is when the underlying concrete method this join point reflects may change. To make the concrete method and other parts that may change fixed you can use this method to get a new fixed join point, a snapshot.

Return

a snapshot of this join point