*/
package org.sonar.api.utils;
+import org.apache.commons.lang.ClassUtils;
+
+import java.util.List;
+
/**
* A utility class for annotations
*
}
if (result==null) {
- Class[] interfaces = initialClass.getInterfaces();
+ List<Class> interfaces = ClassUtils.getAllInterfaces(initialClass);
for (Class anInterface : interfaces) {
result = (A)anInterface.getAnnotation(annotationClass);
if (result!=null) {
interface AnnotatedInterface {
}
-class ImplementedClass implements AnnotatedInterface {
+abstract class AbstractClass implements AnnotatedInterface {
+
+}
+class ImplementedClass extends AbstractClass {
}
\ No newline at end of file