全部博文(413)
分类: Java
2009-03-04 12:51:16
public class Foo {
private int mValue;
public void run() {
Inner in = new Inner();
mValue = 27;
in.stuff();
}
private void doStuff(int value) {
System.out.println("Value is " + value);
}
private class Inner {
void stuff() {
Foo.this.doStuff(Foo.this.mValue); //Access method of other class
}
}
public class InnerB {
void stuff() {
Foo.this.doStuff(Foo.this.mValue); //Access method of other class
}
}
}
Refer to inner class in code: Foo.InnerB,
Refer to inner class in jni: Foo$InnerB.