Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
123456789101112131415161718 |
- package tjpStaticPart;
-
- import java.io.*;
-
- import org.aspectj.lang.*;
-
- public aspect Exceptions {
-
- pointcut exceptionMethods () :
- call(java.io.*.new(..) throws FileNotFoundException);
-
- Object around () throws FileNotFoundException : exceptionMethods() && !within(Exceptions) {
- System.err.println("before: " + thisJoinPoint.getStaticPart());
- Object obj = proceed();
- System.err.println("after: " + thisJoinPoint.getStaticPart());
- return obj;
- }
- }
|