[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] no match for this type name: MessageCommunicator [Xlint:invalidAbsoluteTypeName]
|
First, let me apologize for this question if it or one similar has already has been
responded to. I currently am unable to login to the archives using the userid and
password that the automailer sent me (userid: exquisitus, password: flinderfl7).
I am trying to go thru the examples of "AspectJ in Action", and I am stuck on pg 39
(sigh, *really early*).
Environment:
AspectJ 1.2
Eclipse 3.0 (M9)
JSDK 1.4.2_04
Given the class MessageCommunicatior.java:
//Listing 2.1 MessageCommunicator.java
package helloWorld;
public class MessageCommunicator {
public static void deliver(String message) {
System.out.println(message);
}
public static void deliver(String person, String message) {
System.out.print(person + ", " + message);
}
}
and the test class Test.java:
//Listing 2.2 Test.java
package helloWorld;
public class Test {
public static void main(String[] args) {
MessageCommunicator.deliver("Wanna learn AspectJ?");
MessageCommunicator.deliver("Harry", "having fun?");
}
}
I am prepending "Hello!" to both lines of output using the following advice
MannersAspect.aj:
package helloWorld;
public aspect MannersAspect {
pointcut deliverMessage()
: call (* MessageCommunicator.deliver(..));
before() : deliverMessage() {
System.out.print("Hello! ");
}
}
Which runs fine.
However when I add the following advice to the project --
// HindiSalutationAspect
//
public aspect HindiSalutationAspect {
pointcut appendJi(String person)
: call(* MessageCommunicator.deliver(String, String))
&& args(person, String);
void around(String person) : appendJi(person) {
proceed(person + "ji");
}
}
I get the following warning from Eclipse:
line 5: no match for this type name: MessageCommunicator [Xlint:invalidAbsoluteTypeName]
which has zero meaning for me at this point. (I also get the same warning message when I
attempt the same thing in ajbrowser, which makes perfect sense as they both use the same
jars.)
Any pointers? Any rules of thumb that I am violating?
Thanks in advance.
Michael
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/