code: private static void addNonPublicMethod(ClassWriter cw,
                                             Method method)
      {
          GeneratorAdapter mg;
          String methodName = method.getName();
          String methodSignature = MethodAttribUtils.jdiMethodSignature(method);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, INDENT + "adding method : " + methodName +
                           " " + methodSignature + " : Non-Public");
  
          Class<?>[] methodExceptions = method.getExceptionTypes();
  
          // Convert the return value, arguments, and exception classes to
          // ASM Type objects, and create the ASM Method object which will
          // be used to actually add the method and method code.
          Type returnType = Type.getType(method.getReturnType());
          Type[] argTypes = getTypes(method.getParameterTypes());
          Type[] exceptionTypes = getTypes(methodExceptions);
  
          org.objectweb.asm.commons.Method m =
                          new org.objectweb.asm.commons.Method(methodName,
                                          returnType,
                                          argTypes);
  
          // Create an ASM GeneratorAdapter object for the ASM Method, which
          // makes generating dynamic code much easier... as it keeps track
          // of the position of the arguements and local variables, etc.
          mg = new GeneratorAdapter(ACC_PUBLIC, m, null, exceptionTypes, cw);
  
          // -----------------------------------------------------------------------
          // Begin Method Code...
          // -----------------------------------------------------------------------
          mg.visitCode();
  
          // -----------------------------------------------------------------------
          // throw new EJBException("Only public methods of the bean class may be
          //                         invoked through the no-interface view.");
          // -----------------------------------------------------------------------
          mg.visitTypeInsn(NEW, "javax/ejb/EJBException");
          mg.visitInsn(DUP);
          mg.visitLdcInsn("Only public methods of the bean class may be invoked through the no-interface or no-method-interface view.");
          mg.visitMethodInsn(INVOKESPECIAL, "javax/ejb/EJBException", "<init>", "(Ljava/lang/String;)V");
          mg.visitInsn(ATHROW);
  
          // -----------------------------------------------------------------------
          // End Non-Public Method Code...
          // -----------------------------------------------------------------------
          mg.endMethod(); // GeneratorAdapter accounts for visitMaxs(x,y)
          mg.visitEnd();
      }
docs: F743-1756