您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MissingTypeInDeclareParents.java 592B

123456789101112131415161718192021
  1. import org.aspectj.testing.Tester;
  2. import java.util.*;
  3. import java.io.*;
  4. /** @testcase unmatched type name in a declare parents should result in a warning in -Xlint mode */
  5. public class MissingTypeInDeclareParents {
  6. public static void main(String[] args) throws Exception {
  7. String s = "f" + "oo";
  8. int x = s.indexOf("o");
  9. Tester.check(true, "Kilroy was here");
  10. }
  11. }
  12. class C {
  13. }
  14. aspect A {
  15. /** Xlint warning expected where FileWriter is outside code controlled by implementation */
  16. declare parents : String extends Runnable; // CW 20 Xlint warning
  17. }