code: public static <T extends Annotation> Optional<T> getAnnotation( String annotation, List<? extends HasAnnotations>
              hasAnnotationsList ) {
          try {
              Class clazz = Class.forName( annotation );
              return getAnnotation( clazz, hasAnnotationsList );
          } catch ( ClassNotFoundException e ) {
              return Optional.absent();
          }
      }
docs: Returns the first occurence of the annotation found on the types
  
  @param annotation the annotation
  @param hasAnnotationsList the types
  @return the first occurence of the annotation found on the types
  @param <T> a T object.