Parameter annotation value extraction is not possible right now. From
the online doc:
> Parameter annotation matching is being added in AspectJ1.6. Initially only
> matching is supported but binding will be implemented at some point.
So it is not a bug, it is an enhancement request :)
cheers,
Andy.
2008/5/6 Paulo Zenida <[EMAIL PROTECTED]>:
> Hi all,
>
> I have tried the following snippet of code:
>
> public class T {
> public void f(@Length(min = 0, max = 1) String s1) {
> }
>
> public static void main(String[] args) {
> T t = new T();
> f.f("123");
> }
> }
>
> public aspect A {
> private pointcut lengthParam1(final Object parameter, final Length length)
> :
> execution(* *(@Length (*), ..)) &&
> args(parameter, ..) &&
> @args(length, ..);
>
> before(final Object parameter, final Length length) :
> lengthParam1(parameter, length) {
> enforce(thisJoinPoint, thisEnclosingJoinPointStaticPart, parameter,
> length, 1);
> }
>
> private void enforce(org.aspectj.lang.JoinPoint joinPoint,
> org.aspectj.lang.JoinPoint.StaticPart enclosingJoinPoint,
> Object parameter, Length length, int parameterNumber) {
> System.out.println("Do something...");
> }
> }
>
> But no advice is executed. Is this a bug or am I missing something?
>
> Kind regards,
>
> Paulo Zenida
>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users