Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Cast.java 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import org.aspectj.testing.Tester;
  2. public class Cast {
  3. public static void main(String[] args) {
  4. Tester.expectEvent("cast");
  5. new TargetClass().introducedCast();
  6. Tester.checkAllEvents();
  7. }
  8. }
  9. aspect CastAspect {
  10. /** @testcase Introduced type unavailable to cast expressions in introduced methods */
  11. public void TargetClass.introducedCast() {
  12. boolean boolean_1 = getboolean();
  13. boolean boolean_2 = (boolean) getboolean();
  14. boolean boolean_3 = (boolean) this.getboolean();
  15. byte byte_1 = getbyte();
  16. byte byte_2 = (byte) getbyte();
  17. byte byte_3 = (byte) this.getbyte();
  18. char char_1 = getchar();
  19. char char_2 = (char) getchar();
  20. char char_3 = (char) this.getchar();
  21. short short_1 = getshort();
  22. short short_2 = (short) getshort();
  23. short short_3 = (short) this.getshort();
  24. int int_1 = getint();
  25. int int_2 = (int) getint();
  26. int int_3 = (int) this.getint();
  27. long long_1 = getlong();
  28. long long_2 = (long) getlong();
  29. long long_3 = (long) this.getlong();
  30. float float_1 = getfloat();
  31. float float_2 = (float) getfloat();
  32. float float_3 = (float) this.getfloat();
  33. double double_1 = getdouble();
  34. double double_2 = (double) getdouble();
  35. double double_3 = (double) this.getdouble();
  36. //X X_1 = getX();
  37. //X X_2 = (X) getX();
  38. //X X_3 = (X) this.getX();
  39. Util.signal("cast");
  40. }
  41. }