[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] Annotations; using their members
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This should actually work:
before(Permission p):
call(@Permission * *.*(..))
&& @annotation(p)
&& if(p.value()[0].equals("foo")) { //match on value
//do whatever
}
Eric
reitinger franz wrote:
> Java offers several possibilities to use annotations & it's rather
> easy to create and then use a custom annotation like:
>
> @Target({METHOD,TYPE})
> @Retention(RUNTIME)
> public @interface Permission
> {
> String[] value();
> }
>
> I think that it is not possible to match join points based on
> annotation values because the AnnotationPattern is still not ready
> for such patterns. Is there a workaround available or is it still
> impossible using the annotation values?
>
> ThanX
> franzR
>
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
- --
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.2 (Build 2424)
iQA/AwUBQ0v07swiFCm7RlWCEQLC+gCfXdw3g5xVAjtfUL+4cEe/j/Ugw8UAoJW7
xeW6ye4RVHgRyZNBdKgAp67U
=OBeZ
-----END PGP SIGNATURE-----