code: private List<SecurityConstraint> getConstraintsFromHttpMethodElement(SecurityMetadata securityMetadataFromDD, Collection<String> urlPatterns,
                                                                           ServletSecurityElement servletSecurity) {
          List<SecurityConstraint> securityConstraints = new ArrayList<SecurityConstraint>();
          Collection<HttpMethodConstraintElement> httpMethodConstraints = servletSecurity.getHttpMethodConstraints();
          for (HttpMethodConstraintElement httpMethodConstraint : httpMethodConstraints) {
              String method = httpMethodConstraint.getMethodName();
              List<String> methods = new ArrayList<String>();
              methods.add(method);
              WebResourceCollection webResourceCollection = new WebResourceCollection((List<String>) urlPatterns, methods, new ArrayList<String>(), securityMetadataFromDD.isDenyUncoveredHttpMethods());
              List<WebResourceCollection> webResourceCollections = new ArrayList<WebResourceCollection>();
              webResourceCollections.add(webResourceCollection);
              securityConstraints.add(createSecurityConstraint(securityMetadataFromDD, webResourceCollections, httpMethodConstraint, false));
  
          }
          return securityConstraints;
      }
docs: Gets the security constraints from the HttpMethodConstraint elements defined in the given ServletSecurityElement
  with the given list of url patterns.
  
  @param securityMetadataFromDD the security metadata processed from the deployment descriptor, for updating the roles
  @param urlPatterns the list of URL patterns defined in the @WebServlet annotation
  @param servletSecurity the ServletSecurityElement that represents the information parsed from the @ServletSecurity annotation
  @return a list of security constraints defined by the @HttpMethodConstraint annotations