Parent for inner class added

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@781 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent bd125781d7
commit 6520dac189
  1. 31
      jode/test/InnerClass.java

@ -23,12 +23,22 @@ public class InnerClass
{
private int x;
class Parent
{
int a = 1;
protected int x;
void ambiguous() {
System.err.println("Parent");
}
}
class Inner
{
int a = 4;
private int b = x;
class InnerInner
class InnerInner extends Parent
{
public int getB() {
@ -41,11 +51,20 @@ public class InnerClass
}
public InnerInner(int c) {
x = c;
a = b;
this.x = c;
InnerClass.this.x = b;
this.a = b;
Inner.this.a = c;
this.ambiguous();
Inner.this.ambiguous();
InnerClass.this.ambiguous();
}
}
void ambiguous() {
System.err.println("Inner");
}
private int getB() {
return b;
}
@ -61,9 +80,15 @@ public class InnerClass
Extended(Inner inner) {
inner.super(3);
this.ambiguous();
InnerClass.this.ambiguous();
}
}
void ambiguous() {
System.err.println("InnerClass");
}
private static Inner createInner(InnerClass outer) {
return outer.new Inner();
}

Loading…
Cancel
Save