[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ews.eclipse.technology.aspectj] Newbie set() pointcut question

I'm getting an error on the following aspect, and I'm not sure why. I'm using AspectJ 1.2 and AJDT 1.1.4 on IBM WSAD 5.1.x:

public aspect WatchAnIntAspect
{

    pointcut getAnInt() :
        get ( int com.ibm.wbpte.dlwester.aspects.DlwDataObject.anInt ) ;

    pointcut setAnInt( int newInt ) :
        set ( int com.ibm.wbpte.dlwester.aspects.DlwDataObject.anInt )
                && args ( newInt ) ;

    before ( int newInt ) :
            set ( int com.ibm.wbpte.dlwester.aspects.DlwDataObject.anInt )
            && args ( newInt )
    {
        System.out.println( "setAnInt: Old value of anInt = "
>>>>>           + com.ibm.wbpte.dlwester.aspects.DlwDataObject.anInt ) ;
        System.out.println( "          New value of anInt = "
                + newInt ) ;
    }


On the line indicated with ">>>>>", I am getting the following error:
Cannot make a static reference to the non-static field com.ibm.wbpte.dlwester.aspects.DlwDataObject.anInt


Can anyone tell me what I am doing wrong? How do I access the contents of a member variable of an object?

Thanks!
DLW