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.

BcelApiRules.aj 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC),
  3. * 2003 Contributors.
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors:
  11. * Xerox/PARC initial implementation
  12. * AMC 01.20.2003 extended to support new AspectJ 1.1 options,
  13. * bugzilla #29769
  14. * ******************************************************************/
  15. package org.aspectj.weaver;
  16. import org.aspectj.weaver.*;
  17. import org.aspectj.weaver.bcel.*;
  18. import org.apache.bcel.generic.*;
  19. /**
  20. * Enforces the correct use of BCEL APIs.
  21. */
  22. public aspect BcelApiRules {
  23. /**
  24. * The Utility method needs to be used instead of the BCEL method doue to a bug
  25. * in the implementation of Instruction.copy()
  26. */
  27. declare error:
  28. call(* Instruction.copy()) && within(org.aspectj.weaver..*)
  29. && !withincode(* Utility.copyInstruction(Instruction)):
  30. "use Utility.copyInstruction to work-around bug in Select.copy()";
  31. }