package test; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; public class Main { public static void main(String[] args) { new Main().foo(); } @PerformenceMonitor(expected=1000) public void foo() { } } @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @interface PerformenceMonitor { public int expected(); }