[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] set() pointcut for private fields

Hi,

I have the following class and aspect structure:

public abstract class A {

	private List<?> list;

	public getList() {
		if ( list == null ) {
			list = m(); //m() creates a new list implementation
		}
		return list;
	}
}

public privileged aspect AA {

before(): set(* A.list) {
	//do something
	}
}

Using load time weaving the assignment to list is not getting advised. I tried different variants of the pointcut like set(* *.list), but that doesn't help. The aspect gets registered an other advice/ pointcuts of the aspect do work as expected, so what am I doing wrong here?

	
Jochen