Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Still the dummy variables...

Greetings,

 

A couple of days a go I posted a message asking if the introduction of dummy variables on AJDT was ever considered.

 

Mr. Wes Isberg kindly answered the message mentioning that currently it was not on the plans. He also kindly proposed a small idiom, using JAVA this keyword, to achieve the same sort of goals.

 

I tried to use it but I found Xlint complaining about it. Below I present a little code snippet that serves the purpose of recreate the Xlint warning I got.

 

 

File: Test.java

 

public class Test {

 

    private int i = 0;

 

    public void f(){

 

        this.i = 1;

 

    }

 

    public static void main(String[] args) {

 

        Test t = new Test();

 

        t.f();

 

    }

 

File: CaptureThis.aj

 

import static java.lang.System.out;

 

public aspect CaptureThis {

 

        before() : set(* this.*) {

 

            out.println("Found this.set!");

 

        }

 

        before() : set(* *.*) {

 

            out.println("Found set!");

 

        }

 

    }

 

}

 

 

If you care to compile this in AJDT youÂ’ll get the following output:

 

Found set!

Found set!

 

Correspondig to the second pointcut. Thus, the first one is ignored. Also, on the “Problems” window you should get:

 

no match for this type name: this [Xlint:invalidAbsoluteTypeName]        

 

IÂ’m using the latest Eclipse and AJDT builds.

 

Anyone can help me with this, please?

 

Kind regards,

 

Rodrigo Gonçalves

 

 


Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!

Back to the top