diff -r 0a582b5a2737 -r 25e350c6385f emul/src/main/java/java/lang/Class.java --- a/emul/src/main/java/java/lang/Class.java Tue Oct 30 09:24:41 2012 +0100 +++ b/emul/src/main/java/java/lang/Class.java Sat Dec 01 08:52:30 2012 +0100 @@ -27,6 +27,7 @@ import java.io.InputStream; import java.lang.annotation.Annotation; +import org.apidesign.bck2brwsr.core.JavaScriptBody; /** * Instances of the class {@code Class} represent classes and @@ -382,13 +383,12 @@ * represented by this object. */ public String getName() { - throw new UnsupportedOperationException(); -// String name = this.name; -// if (name == null) -// this.name = name = getName0(); -// return name; + return jvmName().replace('/', '.'); } + @JavaScriptBody(args = "self", body = "return self.jvmName;") + private native String jvmName(); + /** * Returns the {@code Class} representing the superclass of the entity * (class, interface, primitive type or void) represented by this