Mirror of the JODE repository
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.
 
 
 
 
 
 
jode/jode/test/InnerClass.java

53 lines
1007 B

package jode.test;
public class InnerClass {
private int x;
class Inner {
int a = 4;
private int b;
Inner() {
b = x;
}
class InnerInner {
public InnerInner(int c) {
x = c;
a = b;
}
public int getB() {
return Inner.this.getB();
}
public int getStaticB(InnerInner innerinner) {
return innerinner.getB();
}
}
int getB() {
return b;
}
public InnerInner createInnerInner(int a) {
return new InnerInner(a);
}
}
class Extended extends Inner.InnerInner{
Extended(Inner inner) {
inner.super(3);
}
}
static Inner createInner(InnerClass outer) {
return outer.new Inner();
}
InnerClass() {
new Inner().createInnerInner(10).getB();
createInner(this).new InnerInner(42);
}
}