Top Description Fields Methods
org.aspectj.lang

public Interface ProceedingJoinPoint

extends JoinPoint
Known Direct Implementers
org.aspectj.runtime.reflect.JoinPointImpl
Imports
org.aspectj.runtime.internal.AroundClosure

ProceedingJoinPoint exposes the proceed(..) method in order to support around advice in @AJ aspects
Author
Alexandre Vasseur

Field Summary

Inherited from org.aspectj.lang.JoinPoint:
ADVICE_EXECUTIONCONSTRUCTOR_CALLCONSTRUCTOR_EXECUTIONEXCEPTION_HANDLERFIELD_GETFIELD_SETINITIALIZATIONMETHOD_CALLMETHOD_EXECUTIONPREINITIALIZATIONSTATICINITIALIZATIONSYNCHRONIZATION_LOCKSYNCHRONIZATION_UNLOCK

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the result of proceeding
proceed
()

Proceed with the next advice or target method invocation

public Object

Returns:

the result of proceeding
proceed
(Object[]
the arguments to proceed with
args
)

Proceed with the next advice or target method invocation.

public void
set$AroundClosure(AroundClosure
the around closure to associate with this joinpoint
arc
)

The joinpoint needs to know about its closure so that proceed can delegate to closure.run().

public default void
stack$AroundClosure(AroundClosure
the around closure to associate with this joinpoint
arc
)

The joinpoint needs to know about its closure so that proceed can delegate to closure.run().

Inherited from org.aspectj.lang.JoinPoint:
getArgsgetKindgetSignaturegetSourceLocationgetStaticPartgetTargetgetThistoLongStringtoShortStringtoString

Method Detail

proceedback to summary
public Object proceed() throws Throwable

Proceed with the next advice or target method invocation

Returns:Object

the result of proceeding

Exceptions
Throwable:
if the invoked proceed throws anything
proceedback to summary
public Object proceed(Object[] args) throws Throwable

Proceed with the next advice or target method invocation. Unlike code style, proceed(..) in annotation style places different requirements on the parameters passed to it. The proceed(..) call takes, in this order:

  • If 'this()' was used in the pointcut for binding, it must be passed first in proceed(..).
  • If 'target()' was used in the pointcut for binding, it must be passed next in proceed(..) - it will be the first argument to proceed(..) if this() was not used for binding.
  • Finally come all the arguments expected at the join point, in the order they are supplied at the join point. Effectively the advice signature is ignored - it doesn't matter if a subset of arguments were bound or the ordering was changed in the advice signature, the proceed(..) calls takes all of them in the right order for the join point.
Since proceed(..) in this case takes an Object array, AspectJ cannot do as much compile time checking as it can for code style. If the rules above aren't obeyed then it will unfortunately manifest as a runtime error.
Parameters
args:Object[]

the arguments to proceed with

Returns:Object

the result of proceeding

Exceptions
Throwable:
if the invoked proceed throws anything
set$AroundClosureback to summary
public void set$AroundClosure(AroundClosure arc)

The joinpoint needs to know about its closure so that proceed can delegate to closure.run(). This internal method should not be called directly, and won't be visible to the end-user when packed in a jar (synthetic method).

Parameters
arc:AroundClosure

the around closure to associate with this joinpoint

stack$AroundClosureback to summary
public default void stack$AroundClosure(AroundClosure arc)

The joinpoint needs to know about its closure so that proceed can delegate to closure.run(). This internal method should not be called directly, and won't be visible to the end-user when packed in a jar (synthetic method). This should maintain a stack of closures as multiple around advice with proceed are targeting a joinpoint and the stack will need to be unwound when exiting nested advice. Passing a non null arc indicates a push, passing null indicates a pop.

Parameters
arc:AroundClosure

the around closure to associate with this joinpoint