Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Tracing.aj 634B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2004 IBM Corporation and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * Matthew Webster initial implementation
  10. */
  11. public aspect Tracing {
  12. private pointcut mainMethod () :
  13. execution(public static void main(String[]));
  14. before () : mainMethod() {
  15. System.out.println("> " + thisJoinPoint);
  16. }
  17. after () : mainMethod() {
  18. System.out.println("< " + thisJoinPoint);
  19. }
  20. }