private static Annotation checkIfAnnotation(Annotation ann) {
        if (!ann.annotationType().isInstance(ann)) {
            throw new IllegalArgumentException(ann.getClass().getName());
        }
        return ann;
    }
Wraps annotation types to facilitate additional annotations for CDI

@param <T> type of annotated class
support/cdi/src/main/java/org/apache/shiro/cdi/AnnotatedTypeWrapper.java