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.

TraceMyClasses.java 1.0KB

12345678910111213141516171819202122232425262728293031323334353637
  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. */
  10. package tracing.version2;
  11. import tracing.TwoDShape;
  12. import tracing.Circle;
  13. import tracing.Square;
  14. import tracing.ExampleMain;
  15. /**
  16. *
  17. * This class concretizes the abstract crosscut in Trace,
  18. * applying the trace facility to these application classes.
  19. *
  20. */
  21. public aspect TraceMyClasses extends Trace {
  22. pointcut myClass(): within(TwoDShape) || within(Circle) || within(Square);
  23. /**
  24. * A main function for testing the trace aspect.
  25. */
  26. public static void main(String[] args) {
  27. Trace.TRACELEVEL = 2;
  28. Trace.initStream(System.err);
  29. ExampleMain.main(args);
  30. }
  31. }