Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Matching declared annotations by annotation parameters

Hi Andy,
thanks for the quick reply, my case is a bit more elaborate and I
thought that aspectj does not support matching on annotation
parameters; this is my case: the value property of the Sample
annotation is not String type but Class:

@Retention(RetentionPolicy.RUNTIME)
@interface Sample {
   Class<?> type();
}

so my aspect

aspect SampleAspect {
   declare @field : @Sample(type = Long.class) * * : @Added;
}

yields compile error:

[error] Syntax error on token "class", invalid allowable token in
pointcut or type pattern

is there any way to get around that?

thank you!

zoran
--
Human by day user by night


Back to the top