When extending a class gen-class doesn't preserve method annotations.
If class com.bar.Foo has annotated methods then in MyClass all annotations are gone.
(gen-class
:name com.my.MyClass
:extends com.bar.Foo
:implements (link: com.google.common.base.Supplier)
:prefix demo-
:post-init post-init)
(defn demo-post-init (link: this)
(info "initialized")
(swank.swank/start-server :port 68478))
(defn demo-get (link: _)
(get-msg))
Class<?> aClass = Class.forName("com.my.MyClass");
Method(link: ) methods = aClass.getMethods();
for (Method m : methods) {
Annotation(link: ) annotations = m.getAnnotations();
System.out.println(m.getName()+" "+annotations.length);
for (Annotation a : annotations) {
System.out.println(a.annotationType().getClass().getName());
}
}