code: public static List<MonitorMBean> createMBeans(String domain, Monitor<?> monitor,
                                                  ObjectNameMapper mapper) {
      List<MonitorMBean> mbeans = new ArrayList<>();
      createMBeans(mbeans, domain, monitor, mapper);
      return mbeans;
    }
docs: Create a set of MBeans for a {@link com.netflix.servo.monitor.Monitor}. This method will
  recursively select all of the sub-monitors if a composite type is used.
  
  @param domain  passed in to the object name created to identify the beans
  @param monitor monitor to expose to jmx
  @param mapper  the mapper which maps the Monitor to ObjectName
  @return flattened list of simple monitor mbeans