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.

StrictFPAdvice.java 515B

12345678910111213141516171819202122
  1. import org.aspectj.testing.Tester;
  2. public class StrictFPAdvice {
  3. public static void main(String[] args) {
  4. m(2.0);
  5. }
  6. static double m(double a) { return a; }
  7. }
  8. aspect A {
  9. pointcut points(double d): call(double StrictFPAdvice.m(double)) && args(d);
  10. strictfp before(double d): points(d) {
  11. //XXX insert a test here that this body really is strictfp
  12. }
  13. strictfp double around(double d): points(d) {
  14. //XXX insert a test here that this body really is strictfp
  15. return proceed(d);
  16. }
  17. }