docs: private void validateEJBCallbackMethod(InterceptorMethodKind actualKind, Method m, boolean annotation)
                      throws EJBConfigurationException
      {
          // Get the name of the method.
          String methodName = m.getName();
  
          // Map the method name into one of the InterceptorMethodKind enum value
          // it is required to be by the EJB 3 specification.
          InterceptorMethodKind requiredKind = mapEjbCallbackName(methodName);
  
          // If the method is required to be a interceptor lifecycle callback method,
          // does the actual kind match the required kind?
          if (requiredKind != null && actualKind != requiredKind)
          {
              // It is one of the ejbXXXXX methods of the javax.ejb.SessionBean or
              // javax.ejb.MessageDriven interfaces, but either annotation or xml was used
              // to indicate it is the wrong kind of lifecycle callback event.
  
              // Get the class name of the EJB and map both the required InterceptorMethodKind
              // and actual InterceptorMethodKind into a String for the error message.
              String ejbClassName = ivEjbClass.getName();
              String required = mapInterceptorMethodKind(requiredKind, true, annotation);
              String actual = mapInterceptorMethodKind(actualKind, false, annotation);
  
              // Now build and log the error message based on type of EJB.
              StringBuilder sb = new StringBuilder();
              if (ivMDB)
              {
                  // CNTR0243E: Because the {0} enterprise bean implements the javax.ejb.MessageDriven interface,
                  // the {1} method must be a {2} method and not a {3} method.
                  sb.append("CNTR0243E: Because the ").append(ejbClassName);
                  sb.append(" enterprise bean implements the javax.ejb.MessageDriven interface, the ");
                  sb.append(methodName).append(" method must be a ").append(required);
                  sb.append(" method and not a ").append(actual).append(" method.");
                  Tr.error(tc, "INVALID_MDB_CALLBACK_METHOD_CNTR0243E"
                           , new Object[] { ejbClassName, methodName, required, actual });
  
              }
              else if (ivSLSB)
              {
                  // CNTR0241E: Because the {0} enterprise bean implements the javax.ejb.SessionBean interface,
                  // the {1} method must be a {2} method and not a {3} method.
                  sb.append("CNTR0241E: Because the ").append(ejbClassName);
                  sb.append(" enterprise bean implements the javax.ejb.SessionBean interface, the ");
                  sb.append(methodName).append(" method must be a ").append(required);
                  sb.append(" method and not a ").append(actual).append(" method.");
                  Tr.error(tc, "INVALID_SLSB_CALLBACK_METHOD_CNTR0241E"
                           , new Object[] { ejbClassName, methodName, required, actual });
              }
              else if (ivSFSB)
              {
                  // CNTR0242E: Because the {0} enterprise bean implements the javax.ejb.SessionBean interface,
                  // the {1} method must be a {2} method and not a {3} method.
                  sb.append("CNTR0242E: Because the ").append(ejbClassName);
                  sb.append(" enterprise bean implements the javax.ejb.SessionBean interface, the ");
                  sb.append(methodName).append(" method must be a ").append(required);
                  sb.append(" method and not a ").append(actual).append(" method.");
                  Tr.error(tc, "INVALID_SFSB_CALLBACK_METHOD_CNTR0242E"
                           , new Object[] { ejbClassName, methodName, required, actual });
              }
  
              // Throw the EJBConfigurationException with message text that was built for the error.
              throw new EJBConfigurationException(sb.toString());
          }
      }