import org.aspectj.lang.annotation.*;
import java.lang.annotation.*;
import java.lang.reflect.*;
import org.aspectj.lang.*;
@Aspect("perthis(transactional())")
public class Code3 {
@Pointcut("execution(@Transactional * * (..))")
public void transactional() { }
@Before("execution(* *(..))")
public void m(JoinPoint.StaticPart thisJoinPointStaticPart) {
System.out.println(thisJoinPointStaticPart);
}
public static void main(String[] args) {
new AAA().m();
new BBB().m();
new CCC().m();
}
}
aspect XXX {
@Transactional public void CCC.m() {}
}
class AAA {
public void m() { }
}
class BBB {
public void m() { }
}
class CCC {
}
@Retention(RetentionPolicy.RUNTIME) @interface Transactional {}
3cb99965a767eae2b742'/>
blob: 1ae03d2d1e4fdaf6bd441b75f1d88d255247b889 (
plain)