import org.aspectj.lang.annotation.*; import java.lang.annotation.*; import java.lang.reflect.*; @Aspect("perthis(transactional())") public class Code { @Pointcut("execution(@Transactional * * (..))") public void transactional() { } public static void main(String[] args) { print(AAA.class); print(BBB.class); print(CCC.class); } public static void print(Class clazz) { System.out.println(clazz.getName()); Class[] ifs = clazz.getInterfaces(); if (ifs!=null) { for (int i=0;i