Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] no match for this type name: MessageCommunicator [Xlint:invalidAbsoluteTypeName]

It seems that your HindiSalutationAspect is in 
the default package, whereas MannersAspect and 
MessageCommunicator is in helloWorld package. 
That is the reason you need to import MessageCommunicator 
class in one case and not the other.

Please try adding "package helloWorld;" to HindiSalutationAspect
and let us know the result. You shouldn't need to import
MessageCommunicator in that case.

-Ramnivas

--- Michael McConnell <mcconnellem@xxxxxxxxx> wrote:
> Nicolas -- Obviously I should have purchased your book :( -- I may
> yet....
> 
> Your suggestion worked really nicely. Two more questions if you don't
> mind --
> 
> 1. I don't understand why I needed to do it within the
> HindiSalutationAspect, and not the
> MannersAspect.aj -- ???
> 
> 
> package helloWorld;
> 
> public aspect MannersAspect {
> 	pointcut deliverMessage() 
> 		: call (* MessageCommunicator.deliver(..));
> 		
> 	before() : deliverMessage() {
> 		System.out.print("Hello! ");
> 	} 
> }
> (note the lack of any import stmts...)
> 
> 2. Is there any docs within AspectJ I should have looked at before
> asking the user group?
> (Just so I don't keep bugging people with these newbie questions.)
> 
> 
> Thanks again.
> Michael
> --- Nicholas Lesiecki <ndlesiecki@xxxxxxxxx> wrote:
> > Without reading your example, that error generally means that you
> need 
> > to import the named class. (Message Communicator).
> > 
> > Cheers,
> > 
> > Nicholas Lesiecki
> > Software Craftsman, specializing in J2EE,
> > Agile Methods, and aspect-oriented programming
> > 
> > Books:
> > * Mastering AspectJ: http://tinyurl.com/66vf
> > * Java Tools for Extreme Programming: http://tinyurl.com/66vt
> > 
> > Articles on AspectJ:
> > * http://tinyurl.com/66vu and http://tinyurl.com/66vv
> > 
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 
> =====
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/ 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


Back to the top