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.

PackagesAndStaticClassesWithTheSameName.java 817B

123456789101112131415161718192021222324252627
  1. /*
  2. * This test case reveals a limitation in the ajc unparser using fully qualified
  3. * names for types. I don't believe that there is in fact a general solution to
  4. * this problem, so for now we move this to opentests
  5. */
  6. import org.aspectj.testing.*;
  7. public class PackagesAndStaticClassesWithTheSameName {
  8. public static void main(String[] args) {
  9. String string = "string";
  10. java.lang.Str str = new java.lang.Str(string);
  11. Tester.checkEqual(string + ":" + string, str+"");
  12. }
  13. static class java {
  14. static class lang {
  15. static class Str {
  16. private String str;
  17. Str(String str) {
  18. this.str = str;
  19. }
  20. public String toString() { return str + ":" + str; }
  21. }
  22. }
  23. }
  24. }