Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] IDT - separating getter/setter from beans

Is it possible to separate the getter setters into an aspect ?

I tried to use static aspect Pmpl to introduce the getter setters but they can't access the variables defined in the main class.

Something like

public class MyTest() {
    String data1;
}


public aspect MyTestBeanSupport {

    public void setData1(String data) {
        this.data1 = data1;
    }

    public Strng getData1() {
        return data1;;
    }

}



Back to the top