Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ 5 compiler newbei question!

Hello list,
 I am new to aspectj and maybe my question is outdated
but I tried to get info from the net and from the
mailing list from the time aspectj 5 compiler issued..
but no way! the question is simple:

HOW CAN I COMPILE A AN ASPECTJ 5 PROGRAM?

I found that after the announcement of the compiler
Russ has asked a like question.. the reply was:

# javac HelloWorld.java /// java5 compiler
# ajc -inpath . HelloAspect.aj  /// not sure -1.5

well, it compiles, but without weaving, i.e.,
MyClass.java was not changed.. and I have checked that
with cavaj. By the way, only aspectj5 features are not
woven.

can anybody help? 
thanx
modber
public class HelloWorld {
    public static void main(String[] args) {

        sayHello("Modi");
        sayHello("Medo", "Aodi", "Aedo");
        sayHello();
    }

    public static void sayHello(String... name) {
	String[] names = name;
	
	System.out.println("There is " + names.length + "
names.");
	for(int i = 0; i < names.length; i++)
        	System.out.println("Hello, " + names[i] +
"!");
    }

}

public aspect HelloAspect {
  before() : call( * HelloWorld.sayHello(..)) {
    System.out.println("Be ready for the greetings!");
  }
}



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com


Back to the top