Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324
  1. public class Init {
  2. public static void main(String []argv) {
  3. new A();
  4. new B();
  5. }
  6. }
  7. class A {}
  8. class B {}
  9. aspect X {
  10. before(): preinitialization(A.new(..)) && !within(X) {
  11. System.out.println(thisJoinPointStaticPart.getSignature());
  12. }
  13. before(): preinitialization(A.new(..)) && !within(X) {
  14. System.out.println(thisEnclosingJoinPointStaticPart.getSignature());
  15. }
  16. before(): initialization(B.new(..)) && !within(X) {
  17. System.out.println(thisJoinPointStaticPart.getSignature());
  18. }
  19. before(): initialization(B.new(..)) && !within(X) {
  20. System.out.println(thisEnclosingJoinPointStaticPart.getSignature());
  21. }
  22. }