Facebook
  1. public aspect Zadanie1Aspect {
  2.     pointcut blockMethodPointCut(double d): execution (* pak1.*.*(double)) && args(d);
  3.  
  4.     before(double arg):blockMethodPointCut(arg){
  5.         if (arg < 0) {
  6.             throw new IllegalArgumentException("Nieprawidlowy argument");
  7.         }
  8.     }
  9. }