private static Annotation[] getAnnotations(TestCase test) {
        try {
            Method m = test.getClass().getMethod(test.getName());
            return m.getDeclaredAnnotations();
        } catch (SecurityException e) {
        } catch (NoSuchMethodException e) {
        }
        return new Annotation[0];
    }
private static Annotation [ ] getAnnotations ( TestCase test ) { try { Method m = test . getClass ( ) . getMethod ( test . getName ( ) ) ; return m . getDeclaredAnnotations ( ) ; } catch ( SecurityException e ) { } catch ( NoSuchMethodException e ) { } return new Annotation [ 0 ] ; }
Get the annotations associated with given TestCase.
@param test the TestCase.