@SuppressWarnings("unchecked")
    @Override
    public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
        return (T) annotations.get(annotationClass);
    }
Annotations is a merging adapter for the {@link AnnotatedElement} interface

@author tiwe
querydsl-core/src/main/java/com/querydsl/core/util/Annotations.java