Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

TraceMyClasses.java 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. Copyright (c) Xerox Corporation 1998-2002. All rights reserved.
  3. Use and copying of this software and preparation of derivative works based
  4. upon this software are permitted. Any distribution of this software or
  5. derivative works must comply with all applicable United States export control
  6. laws.
  7. This software is made available AS IS, and Xerox Corporation makes no warranty
  8. about the software, its performance or its conformity to any specification.
  9. |<--- this code is formatted to fit into 80 columns --->|
  10. |<--- this code is formatted to fit into 80 columns --->|
  11. |<--- this code is formatted to fit into 80 columns --->|
  12. */
  13. package tracing.version3;
  14. import tracing.TwoDShape;
  15. import tracing.Circle;
  16. import tracing.Square;
  17. import tracing.ExampleMain;
  18. /**
  19. *
  20. * This class concretizes the abstract crosscut in Trace,
  21. * applying the trace facility to these application classes.
  22. *
  23. */
  24. public aspect TraceMyClasses extends Trace {
  25. pointcut myClass(Object obj):
  26. this(obj) &&
  27. (within(TwoDShape) || within(Circle) || within(Square));
  28. /**
  29. * A main function for testing the trace aspect.
  30. */
  31. public static void main(String[] args) {
  32. Trace.TRACELEVEL = 2;
  33. Trace.initStream(System.err);
  34. ExampleMain.main(args);
  35. }
  36. }