import org.aspectj.lang.NoAspectBoundException; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; @Aspect public class A2 { private static final int MAX = 1000; private static Throwable ajc$initFailureCause; public static final A2 ajc$perSingletonInstance; static { try { ajc$postClinit(); } catch (Throwable localThrowable) { ajc$initFailureCause = localThrowable; } } private static void ajc$postClinit() { ajc$perSingletonInstance = new A2(); } public static boolean hasAspect() { return ajc$perSingletonInstance != null; } public static A2 aspectOf() { if (ajc$perSingletonInstance == null) { throw new NoAspectBoundException("test.A2", ajc$initFailureCause); } return ajc$perSingletonInstance; } @Around("CoupureIncI(x)") public void AutourDeCoupureIncI(ProceedingJoinPoint joinPoint, int x) throws Throwable { if (((C)joinPoint.getTarget()).i + x > 1000) { throw new RuntimeException(); } joinPoint.proceed(new Object[] { Integer.valueOf(x), joinPoint.getTarget() }); } }