[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-dev] pointcut problem
|
The *execution* of the ServerSocket constructor happens *within* the
ServerSocket class itself.
Try :
after() returning : within(Server) && call(ServerSocket.new(int)) { ...
instead, since the *call* to the constructor is indeed *within* the Server
class.
Regards, Adrian.
-- Adrian
Adrian_Colyer@xxxxxxxxxx
"Eric Macaulay" <eeoam@xxxxxxxxx>
Sent by: aspectj-dev-admin@xxxxxxxxxxx
19/05/2004 13:47
Please respond to
aspectj-dev
To
<aspectj-dev@xxxxxxxxxxx>
cc
Subject
[aspectj-dev] pointcut problem
I have the following constructor:
public Server() {
try {
socket = new ServerSocket(2004);
}catch(IOException x) {
System.out.println("Unable to create server socket.");
System.exit(-1);
}
}
When the ServerSocket constructor returns I want to to print out a message
so I used this code:
after() returning(): within(Server) && execution(ServerSocket.new(int)) {
System.out.println("listening...");
}
Howeve when I run the program no message is displayed. Can anyone help?
Eric Macaulay