code: public static Template getTemplateAnnotation(final Annotation[] annotations) {
          if (annotations != null && annotations.length > 0) {
              for (Annotation annotation : annotations) {
                  if (annotation instanceof Template) {
                      return (Template) annotation;
                  }
              }
          }
  
          return null;
      }
docs: Extract {@link org.glassfish.jersey.server.mvc.Template template} annotation from given list.
  
  @param annotations list of annotations.
  @return {@link org.glassfish.jersey.server.mvc.Template template} annotation or {@code null} if this annotation is not present.