Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] aspect instantiation

Is there a way for getting the values of an aspect instance from another aspect?
I don't know how to do it without using static modifier in the attribute
To fix it I think that I'd have to intercept aspect instantiation and get the attribute.....
the aspect below contains the attribute ro be read (selectionListener).


public abstract aspect AbstractListener pertarget( getListener(SelectionListener)) {
   
    private  SelectionListener selectionListener = null;
   
    public abstract pointcut getListener(SelectionListener sl);
   
   
   
    before(SelectionListener sl) : getListener(sl) {
        this.selectionListener = sl;
    }
   
   
    public SelectionListener getSelectionListener() {
        return selectionListener;
    }
   

}


Back to the top