Code example for AnnotatedElement

Methods: isAnnotationPresent

0
            } 
            return true; 
        } 
         
        private static boolean hasAnnotation(AnnotatedElement meta, Class<? extends Annotation> annon) {
            return meta.isAnnotationPresent(annon);
        } 
         
        private static boolean hasAnnotatedMethod(Class<?> aClass) {
            try { 
                //FIXME Scan superclasses's methods. 
                for (Method method: aClass.getMethods()) {
                    if (hasAnnotation(method, Test.class)) {
                        return true; 
                    } 
                } 
            } catch (Exception ignore) {
            } catch (LinkageError ignore) {
            } 
            return false; 
        }