2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
7 import java.lang.annotation.Annotation;
8 import org.apidesign.bck2brwsr.core.JavaScriptBody;
12 * @author Jaroslav Tulach <jtulach@netbeans.org>
14 final class AnnotationImpl implements Annotation {
15 public Class<? extends Annotation> annotationType() {
19 @JavaScriptBody(args = { "a", "n", "values" }, body =
21 + "for (p in values) {"
22 + " a[p + 'I'] = function() { return v[p]; }"
24 + "a['$instOf_' + n] = true;"
27 private static <T extends Annotation> T create(AnnotationImpl a, String n, Object values) {
30 static <T extends Annotation> T create(Class<T> annoClass, Object values) {
31 return create(new AnnotationImpl(), annoClass.getName().replace('.', '_'), values);