Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Match a method call on a class field with specific annotation

Hi all,

I don't succeed to express with AspectJ 5 this expression :

	Match a method call on a class field with specific annotation
	(Of course, I don't know the name of the class and field)

Exemple : 

	public class MyClass {

		@MyAnnotation
		public static SortedMap myMap1 = new TreeMap();

		public static SortedMap myMap2 = new TreeMap();

		public static void main(String[] args) {
			myMap1.put("key","value"); // Match this method call
			myMap2.put("key","value"); // Don't match this method call
		}
	}

Any suggestion would be appreciated,

Regards

	Mickaël Rifflard




Back to the top