code: static List<String> iterateDownPids(List<String> segments) {
          List<String> res = new ArrayList<>();
          for (int i = segments.size(); i > 0; i--) {
              StringBuilder sb = new StringBuilder();
              sb.append(JMX_ACL_PID_PREFIX);
              for (int j = 0; j < i; j++) {
                  sb.append('.');
                  sb.append(segments.get(j));
              }
              res.add(sb.toString());
          }
          res.add(JMX_ACL_PID_PREFIX); // this is the top PID (aka jmx.acl)
          return res;
      }
docs: see: <code>org.apache.karaf.management.KarafMBeanServerGuard#iterateDownPids(java.util.List)</code>
  
  Given a list of segments, return a list of PIDs that are searched in this order.
  For example, given the following segments: org.foo, bar, test
  the following list of PIDs will be generated (in this order):
  jmx.acl.org.foo.bar.test
  jmx.acl.org.foo.bar
  jmx.acl.org.foo
  jmx.acl
  The order is used as a search order, in which the most specific PID is searched first.
  Assume that none of the segments contain special/wildcard values.
  
  @param segments the ObjectName segments.
  @return the PIDs corresponding with the ObjectName in the above order.