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.

Basic2.java 449B

1234567891011121314151617181920
  1. import java.lang.reflect.Method;
  2. public class Basic2 {
  3. public static void main(String[] args) {
  4. Method[] ms = X.class.getMethods();
  5. for (int i = 0; i < ms.length; i++) {
  6. if (ms[i].getName().indexOf("if$")!=-1) {
  7. System.out.println("if method: "+ms[i]);
  8. }
  9. }
  10. }
  11. public void m() {}
  12. }
  13. aspect X {
  14. pointcut p(): execution(* m(..)) && if(true==true) && if(true==(true || true));
  15. pointcut q(): execution(* m(..)) && if(true==true);
  16. }