code: private static Annotation getBindingAnnotation(Annotation[] annotations) {
      for (Annotation annotation : annotations) {
        Class<? extends Annotation> type = annotation.annotationType();
        if (type.isAnnotationPresent(BindingAnnotation.class)) {
          return annotation;
        }
      }
      
      return null;
    }
docs: Returns the first {@link Annotation} from the given array that
  is a {@link BindingAnnotation}.
  
  @see BindingAnnotation