@SuppressWarnings("unchecked")
    public <T extends Annotation> Opt<T> getAnnotation(Class<T> annotationClass) {
        for (Annotation annotation : annotations) {
            if (annotation.annotationType() == annotationClass) {
                return Opt.of((T) annotation);
            }
        }
        return Opt.absent();
    }
@ SuppressWarnings ( "unchecked" ) public < T extends Annotation > Opt < T > getAnnotation ( Class < T > annotationClass ) { for ( Annotation annotation : annotations ) { if ( annotation . annotationType ( ) == annotationClass ) { return Opt . of ( ( T ) annotation ) ; } } return Opt . absent ( ) ; }
@param annotationClass Class of annotation to find.
@param <T> Type of annotation to find.
@return Annotation of the requested type, if exists.