spegling av
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-27 05:54:38 +02:00
28 rader
401 B
Java
28 rader
401 B
Java
import org.aspectj.testing.Tester;
|
|
|
|
import java.util.*;
|
|
|
|
public class InnerAccess {
|
|
public static void main(String[] args) {
|
|
Tester.checkEqual(new C().getCount(), 2);
|
|
}
|
|
}
|
|
|
|
|
|
class C {
|
|
protected int i = 2;
|
|
private String s = "hi";
|
|
|
|
public int getCount() {
|
|
return new Object() {
|
|
public int m() {
|
|
return s.length();
|
|
}
|
|
}.m();
|
|
}
|
|
}
|
|
|
|
|
|
class D implements Map.Entry {
|
|
}
|