1.1 --- a/emul/src/main/java/java/lang/Class.java Tue Oct 30 09:24:41 2012 +0100
1.2 +++ b/emul/src/main/java/java/lang/Class.java Sat Dec 01 08:52:30 2012 +0100
1.3 @@ -27,6 +27,7 @@
1.4
1.5 import java.io.InputStream;
1.6 import java.lang.annotation.Annotation;
1.7 +import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.8
1.9 /**
1.10 * Instances of the class {@code Class} represent classes and
1.11 @@ -382,13 +383,12 @@
1.12 * represented by this object.
1.13 */
1.14 public String getName() {
1.15 - throw new UnsupportedOperationException();
1.16 -// String name = this.name;
1.17 -// if (name == null)
1.18 -// this.name = name = getName0();
1.19 -// return name;
1.20 + return jvmName().replace('/', '.');
1.21 }
1.22
1.23 + @JavaScriptBody(args = "self", body = "return self.jvmName;")
1.24 + private native String jvmName();
1.25 +
1.26 /**
1.27 * Returns the {@code Class} representing the superclass of the entity
1.28 * (class, interface, primitive type or void) represented by this