You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Code3.java 402B

123456789101112131415161718192021
  1. import java.lang.annotation.*;
  2. public class Code3 {
  3. public static boolean isTrue = true;
  4. public void m() {
  5. }
  6. public static void main(String []argv) {
  7. new Code3().m();
  8. }
  9. }
  10. aspect X {
  11. @org.aspectj.lang.annotation.control.CodeGenerationHint(ifNameSuffix="barney")
  12. pointcut p(): execution(* Code3.*(..)) && if(Code3.isTrue);
  13. before(): p() {
  14. System.out.println("advice");
  15. }
  16. }