Bug 321820 - Declare annotation to a method param
Summary: Declare annotation to a method param
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.9M2   Edit
Hardware: PC Linux
: P3 enhancement with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2010-08-05 03:06 EDT by alcoholitro CLA
Modified: 2013-06-24 11:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alcoholitro CLA 2010-08-05 03:06:56 EDT
AspectJ would support a declaration rule to method params.

I.E.: I want to publish a service as a web service. I need to annotate the params of a method with @WebParam.

AspectJ supports the declaration of annotations in the method and has a syntax to check params with pointcuts:

    pointcut p1(): execution(public * (@Controller *).*(@MyParamAnnotation (*),..)); 

I proposed this syntax to assign annotations to paramas:

    declare @param * *(*, Class className, ..) : @Annotation(annotationParameter = "value");

Result: assign the annotation '@Annotation(annotationParameter = "value")' to the type of param 'Class' with the name 'className'.

It has to be declared for each param to assign individually the annotation.

I think it would be a necessary improvement to increase the productivity of AspectJ.

Thank you.
Comment 1 alcoholitro CLA 2010-09-17 04:57:07 EDT
Hi!

Is there any news on this subject ?

I've linked this improvement to Spring-ROO AspectJ generation. It could be very useful for both.

JIRA: 

* https://jira.springsource.org/browse/ROO-1390

Thank you !
Comment 2 Andrew Clement CLA 2010-09-17 10:24:02 EDT
nope, no news on this yet.  When changes are made this bug will be updated.
Comment 3 Andrew Clement CLA 2013-06-24 11:05:24 EDT
unsetting the target field which is currently set for something already released