docs: @SuppressWarnings("unchecked")
      public static final void getXMLPermissions(ArrayList[] securityRoles,
                                                 boolean[] permitAll,
                                                 boolean[] denyAll,
                                                 int type,
                                                 String[] methodNames,
                                                 Class<?>[][] methodParamTypes,
                                                 List permissionsList,
                                                 BeanMetaData bmd) //PK93643
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "getXMLPermissions", Arrays.toString(securityRoles));
  
          if (permissionsList != null) {
              if (isTraceOn && tc.isDebugEnabled()) {
                  Tr.debug(tc, "*** Method Permissions list has " + permissionsList.size() + " Security Permission(s) to process ***");
              }
  
              // Elements of highestStyleOnMethod[] are initialized to zero by Java rules.
  
              // i : PermissionsList loop
              // j : MethodElements loop
              // k : Method loop
  
              for (int i = 0; i < permissionsList.size(); ++i) {
                  MethodPermission methodPermission = (MethodPermission) permissionsList.get(i);
                  boolean isUnchecked = methodPermission.isUnchecked();
                  List<String> roleNames = methodPermission.getRoleNames();
                  List<com.ibm.ws.javaee.dd.ejb.Method> methodElements = methodPermission.getMethodElements();
  
                  for (int j = 0; j < methodElements.size(); ++j) {
                      com.ibm.ws.javaee.dd.ejb.Method me = methodElements.get(j);
                      String ejbNameFromMethodElement = me.getEnterpriseBeanName();
                      int meType = me.getInterfaceTypeValue();
  
                      // If ejbNameFromMethodElement is null the customer most likey has an xml
                      // coding error in the method element where the ejb-name is incorrect.
                      if (ejbNameFromMethodElement == null) { //PK93643
                          Tr.warning(tc, "INVALID_METHOD_PERMISSION_XML_CNTR0123W",
                                     new Object[] { bmd.getJ2EEName().getModule(), bmd.enterpriseBeanName }); //PK93643
                      }
  
                      if (isTraceOn && tc.isDebugEnabled()) {
                          if (j == 0) {
                              Tr.debug(tc, "#" + i + " Method Permission  has " +
                                           methodElements.size() + " Method Element(s).");
                          }
                          Tr.debug(tc, "Process element " + me.getMethodName() +
                                       " Method Element type = " + meType);
  
                      }
  
                      if ((ejbNameFromMethodElement != null) && (ejbNameFromMethodElement.equals(bmd.enterpriseBeanName))) { //PK93643
                          String meName = me.getMethodName().trim();
                          if (meName.equals("*")) {
                              if (meType == com.ibm.ws.javaee.dd.ejb.Method.INTERFACE_TYPE_UNSPECIFIED) {
                                  // style type 1 -- wildcard on all bean methods
                                  for (int k = 0; k < methodNames.length; ++k) {
                                      // If unchecked, then all roles are permitted access
                                      if (isUnchecked) {
                                          if (isTraceOn && tc.isDebugEnabled()) {
                                              trace(me, "Style 1 - Permit all roles.");
                                          }
                                          permitAll[k] = true;
                                      } else {
                                          if (isTraceOn && tc.isDebugEnabled()) {
                                              trace(me, "Style 1 - assigning roles " + roleNames);
                                          }
  
                                          // create ArrayList of the security roles
                                          if (securityRoles[k] == null) { //d444436
                                              securityRoles[k] = new ArrayList<String>();
                                          }
                                          securityRoles[k].addAll(roleNames);
                                      }
                                  }
  
                              } else if (meType == type) { //LIDB2257.19
                                  // style type 2 -- wildcard on home or remote interface methods
                                  for (int k = 0; k < methodNames.length; ++k) {
                                      // If unchecked, then all roles are permitted access
                                      if (isUnchecked) {
                                          if (isTraceOn && tc.isDebugEnabled()) {
                                              trace(me, "Style 2 - Permit all roles.");
                                          }
                                          permitAll[k] = true;
                                      } else {
                                          if (isTraceOn && tc.isDebugEnabled()) {
                                              trace(me, "Style 2 - assigning roles " + roleNames);
                                          }
  
                                          // Create new ArrayList of security roles         //d444436
                                          if (securityRoles[k] == null) {
                                              securityRoles[k] = new ArrayList<String>();
                                          }
                                          securityRoles[k].addAll(roleNames);
                                      }
                                  }
                              }
                          } else if (meType == com.ibm.ws.javaee.dd.ejb.Method.INTERFACE_TYPE_UNSPECIFIED || meType == type) { //LIDB2257.19
                              // It is not a wildcard, and either has an unspecified
                              // type, or is of the right type (Remote/Home/Local),
                              // so check for a method name match.             d123321
                              for (int k = 0; k < methodNames.length; ++k) {
  
                                  if (meName.equals(methodNames[k])) {
                                      List<String> meParms = me.getMethodParamList();
                                      if (meParms == null) {
                                          // style type 3 - matching method name, no signature
                                          //                specified
  
                                          // If unchecked, then all roles are permitted access
                                          if (isUnchecked) {
                                              if (isTraceOn && tc.isDebugEnabled()) {
                                                  trace(me, "Style 3 - Permit all roles.");
                                              }
                                              permitAll[k] = true;
                                          } else {
                                              if (isTraceOn && tc.isDebugEnabled()) {
                                                  trace(me, "Style 3 - assigning roles " + roleNames);
                                              }
  
                                              // create ArrayList of security roles
                                              if (securityRoles[k] == null) { //d444436
                                                  securityRoles[k] = new ArrayList<String>();
                                              }
                                              securityRoles[k].addAll(roleNames);
                                          }
                                      } else {
                                          if (DDUtil.methodParamsMatch(meParms, methodParamTypes[k])) {
                                              // style type 4 - matching method name and signature
  
                                              // If unchecked, then all roles are permitted access
                                              if (isUnchecked) {
                                                  if (isTraceOn && tc.isDebugEnabled()) {
                                                      trace(me, "Style 4 - Permit all roles.");
                                                  }
                                                  permitAll[k] = true;
                                              } else {
                                                  if (isTraceOn && tc.isDebugEnabled()) {
                                                      trace(me, "Style 4 - assigning roles " + roleNames);
                                                  }
  
                                                  // create security roles ArrayList
                                                  if (securityRoles[k] == null) { //d444436
                                                      securityRoles[k] = new ArrayList<String>();
                                                  }
                                                  securityRoles[k].addAll(roleNames);
                                              }
  
                                          } // method parms match specified parms
                                      } // method parms were specified
                                  } // methodExtension name matches method name
                              } // method loop (k)
                          } // if/then/else for meName='*'
                      } // enterpriseBean name matches parm in methodExtension
                  } // methodElements loop (j)
              } // permissionsList loop (i)
  
          } // permissionsList != null
  
          if (isTraceOn && tc.isEntryEnabled()) {
              Tr.exit(tc, "getXMLPermissions " +
                          Arrays.toString(securityRoles) +
                          " PermitAll = " +
                          Arrays.toString(permitAll));
  
          }
  
      }