mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-14 14:11:27 +02:00
17 lines
444 B
Java
17 lines
444 B
Java
import org.aspectj.testing.Tester;
|
|
|
|
public class AnonFolding {
|
|
public static void main(String[] args) {
|
|
Tester.checkEqual(ANON.toString(), "ANON");
|
|
}
|
|
|
|
public static Object ANON = new Object() {
|
|
public Object m() { return ANON; }
|
|
public String toString() {
|
|
Tester.checkEqual(ANON, m(), "reference to itself");
|
|
return "ANON";
|
|
}
|
|
|
|
};
|
|
}
|