Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] unsuscribe

-----Mensaje original-----
De: qqasim@xxxxxxxxxxxxxx [mailto:qqasim@xxxxxxxxxxxxxx]
Enviado el: martes, 26 de agosto de 2003 11:18
Para: aspectj-users@xxxxxxxxxxx
Asunto: [aspectj-users] general question


Can someone tell me if the following is possible with AOP or with AspectJ.

I have a class that implements 2 methods:

public void method1(DataInputStream call, DataOutputStream result) 
 {
        String username = call.readUTF();
	String password = call.readUTF();

        SomeClass c = new SomeClass();
        c.login(username,password);

        return;
    } 

public void method2(DataInputStream call, DataOutputStream result) 
 {
        String username = call.readUTF();
	String password = call.readUTF();

        SomeClass c = new SomeClass();
        c.search(username,password);

        return;
    } 

As you can see, the first two operations of both methods read username and 
password from DataIutputStream and then call some other methods. 

Is it possible to define ONE pointcut and ONE advice that are able to read
data 
from DataInputStream and then call appropriate methods, such as c.login(..)
o 
c.search(..).



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top