diff -r 000000000000 -r bf0a77f029c4 emul/src/main/java/java/lang/AnnotationImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emul/src/main/java/java/lang/AnnotationImpl.java Sun Dec 02 12:26:14 2012 +0100 @@ -0,0 +1,33 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package java.lang; + +import java.lang.annotation.Annotation; +import org.apidesign.bck2brwsr.core.JavaScriptBody; + +/** + * + * @author Jaroslav Tulach + */ +final class AnnotationImpl implements Annotation { + public Class annotationType() { + return getClass(); + } + + @JavaScriptBody(args = { "a", "n", "values" }, body = + "var v = values;" + + "for (p in values) {" + + " a[p + 'I'] = function() { return v[p]; }" + + "}" + + "a['$instOf_' + n] = true;" + + "return a;" + ) + private static T create(AnnotationImpl a, String n, Object values) { + return null; + } + static T create(Class annoClass, Object values) { + return create(new AnnotationImpl(), annoClass.getName().replace('.', '_'), values); + } +}