[
http://jira.jboss.com/jira/browse/JBAOP-37?page=all ]
Flavia Rainone updated JBAOP-37:
--------------------------------
Description:
This should be optimized as well. I've done a non-CVS-checked-in prototype of this.
Feature Details:
To use this feature, one should use the xml tags 'before', 'after' and
'throwing'.
The signature of these advices should take any annotated arguments (annotation rules
follow) and 'after' can return a value in order to overwrite/replace the
intercepted join point returned value.
Besides, to continue using the advice around, the user should just continue using the
'advice' xml tag.
Around advices should either stick to the signature
Object [advice_name](Invocation invocation)
Or they can now use annotated parameters, as in 'before', 'after' and
'throwing'
The parameters can be annotated with JoinPoint, Invocation, Return, Throwable, Arg, Args,
Callee, Caller and Target.
Parameter Annotation Rules:
Except for around default signature, all parameters must be annotated with one of the
annotations defined in package org.jboss.aop.advice. We have annotations that are allowed
only for specific types of join points, and we have annotations that are allowed only for
specific types of advices.
These annotations are allowed depending on the advice type:
- JoinPoint: Before, After, Throwing
- Invocation: Around
- Return: Around, After
- Throwable: Throwing
These annotations are allowed depending on the join point type:
- Callee: call join points
- Caller: call join points
- Target: every non-static join point that is not a call
Finally, we have the mutually exclusive annotations Arg and Args. Both can always be used
(but not on the same advice method). The first one must annotate every advice parameter
whose value is the value of a join point argument. The second one annotates parameters of
type Object[] that must receive all join point arguments values.
Advice Matching Rules
Every Arg parameter is bound to a join point argument of the same type. If there is more
than one join point argument with the requested type, then the Arg parameter will be bound
to the first join point argument that has not been bound yet.
When there are overloaded advice methods, JBoss AOP will use a priority order to pick the
best match. The advice method with the most suitable type of the highest priority
annotated parameter type is chosen.
The increasing priority order of arguments is: Arg/Args, Return/Throwable,
Target/Callee/Caller , JoinPoint/Invocation.
was:This should be optimized as well. I've done a non-CVS-checked-in prototype of
this.
Added rule description to feature.
Before, After, After Throwing support
-------------------------------------
Key: JBAOP-37
URL:
http://jira.jboss.com/jira/browse/JBAOP-37
Project: JBoss AOP
Issue Type: Feature Request
Affects Versions: 2.0.0.alpha1
Reporter: Bill Burke
Assigned To: Flavia Rainone
Fix For: 2.0.0.alpha3
Original Estimate: 1 week
Remaining Estimate: 1 week
This should be optimized as well. I've done a non-CVS-checked-in prototype of this.
Feature Details:
To use this feature, one should use the xml tags 'before', 'after' and
'throwing'.
The signature of these advices should take any annotated arguments (annotation rules
follow) and 'after' can return a value in order to overwrite/replace the
intercepted join point returned value.
Besides, to continue using the advice around, the user should just continue using the
'advice' xml tag.
Around advices should either stick to the signature
Object [advice_name](Invocation invocation)
Or they can now use annotated parameters, as in 'before', 'after' and
'throwing'
The parameters can be annotated with JoinPoint, Invocation, Return, Throwable, Arg, Args,
Callee, Caller and Target.
Parameter Annotation Rules:
Except for around default signature, all parameters must be annotated with one of the
annotations defined in package org.jboss.aop.advice. We have annotations that are allowed
only for specific types of join points, and we have annotations that are allowed only for
specific types of advices.
These annotations are allowed depending on the advice type:
- JoinPoint: Before, After, Throwing
- Invocation: Around
- Return: Around, After
- Throwable: Throwing
These annotations are allowed depending on the join point type:
- Callee: call join points
- Caller: call join points
- Target: every non-static join point that is not a call
Finally, we have the mutually exclusive annotations Arg and Args. Both can always be used
(but not on the same advice method). The first one must annotate every advice parameter
whose value is the value of a join point argument. The second one annotates parameters of
type Object[] that must receive all join point arguments values.
Advice Matching Rules
Every Arg parameter is bound to a join point argument of the same type. If there is more
than one join point argument with the requested type, then the Arg parameter will be bound
to the first join point argument that has not been bound yet.
When there are overloaded advice methods, JBoss AOP will use a priority order to pick the
best match. The advice method with the most suitable type of the highest priority
annotated parameter type is chosen.
The increasing priority order of arguments is: Arg/Args, Return/Throwable,
Target/Callee/Caller , JoinPoint/Invocation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira