*** empty log message ***

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@754 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent aaf2d4ab6b
commit 3840a9ddde
  1. 2
      jode/jode/type/ClassInterfacesType.java
  2. 35
      jode/test/InnerClass.java

@ -483,7 +483,7 @@ public class ClassInterfacesType extends ReferenceType {
else else
type = ClassInfo.javaLangObject; type = ClassInfo.javaLangObject;
String name = type.getName(); String name = type.getName();
int dot = name.lastIndexOf('.'); int dot = Math.max(name.lastIndexOf('.'), name.lastIndexOf('$'));
if (dot >= 0) if (dot >= 0)
name = name.substring(dot+1); name = name.substring(dot+1);
if (Character.isUpperCase(name.charAt(0))) if (Character.isUpperCase(name.charAt(0)))

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

Loading…
Cancel
Save