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.

AnonFolding.java 444B

12345678910111213141516
  1. import org.aspectj.testing.Tester;
  2. public class AnonFolding {
  3. public static void main(String[] args) {
  4. Tester.checkEqual(ANON.toString(), "ANON");
  5. }
  6. public static Object ANON = new Object() {
  7. public Object m() { return ANON; }
  8. public String toString() {
  9. Tester.checkEqual(ANON, m(), "reference to itself");
  10. return "ANON";
  11. }
  12. };
  13. }