Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] returning result in after/before advice

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I don't quite understand your problem. A before advice inserts
functionality *before* a joinpoint - here *before* a method call.
Since the advice is executed *before* the call, how could it be
possible to retrieve a return value?

You can use an "after returning" advice as well, if you like.

Eric

Naval Vaidya wrote:
> AspectJ allows returning results in only around advice.
> I have a following problem:
> 
> 1. PreparedStatement pstmt = conn.prepareStatement(query); 2. pstmt
> = addParamToPreparedStmt(pstmt, params); 
> 
> I want to write a before advice for the first statement.
> i.e. before(): call(addParamToPreparedStmt(..){ execute statemnt 1}
> How can i return the result of it? 
> 
> Naval.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users

- -- 
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQpc+xcwiFCm7RlWCEQIhkQCeOW/L8nlVVJh4ZnAkAMiaQAw8Mr4AoK1Q
S+fus5pmZXX2J9feiKBqK58T
=7ynz
-----END PGP SIGNATURE-----




Back to the top