private static Map<String, Method> createOperationMethods(BeanInfo beanInfo) throws ManagementException {
        Set<Method> allAccessors = allAccessors(beanInfo);
        Map<String, Method> operationMethods = new HashMap<String, Method>();
        for (MethodDescriptor descriptor : beanInfo.getMethodDescriptors()) {
            Method method = descriptor.getMethod();
            ManagedOperation operationAnnotation = method.getAnnotation(ManagedOperation.class);
            if (operationAnnotation != null && allAccessors.contains(method)) {
                throw new ManagementException(
                        String.format("Accessor method %s is annotated as an @%s", method, ManagedOperation.class.getName()));
            }
            /* consider the Method an automatic operation if it satisfies all of:
             * 1. its class is annotated with @MBean(automatic=OPERATION)
             * 2. it is a public instance (non static) method
             * 3. it is NOT considered a bean accessor (getter/setter)
             */
            boolean isAutomatic = isAutomatic(method.getDeclaringClass(), AutomaticType.OPERATION);
            boolean autoOperation = (isAutomatic && isPublicInstance(method) && !allAccessors.contains(method));
            if (operationAnnotation != null || autoOperation) {
                // This method is an operation
                Method old = operationMethods.put(method.getName(), method);
                if (old != null) {
                    throw new ManagementException(format("Multiple Operation annotations for operation %s of %s",
                            method.getName(), old.getDeclaringClass()));
                }
            }
        }
        return operationMethods;
    }