Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
R: [aspectj-users] Regarding weaving Java Programs

I don't know if I get it right, but if you think that
call(* MessageCommunicator.deliver(..));

means "every static call to MessageCommunicator.deliver()" you are wrong.
It means "every call of the method deliver of the class
MessageCommunicator".
Then if you write:

public class MessageCommunicator
{
            public void deliver(String message)
            {
                        System.out.println(message);
            }
}

and

public class Test
{
            public static void main(String[] args)
            {
                    MessageCommunicator    messageCommunicator = new
MessageCommunicator();
                        messageCommunicator.deliver("WELCOME TO AOP");

            }

}

you should get the same result.




Back to the top