code: static List<String> nameSegments(ObjectName objectName) {
          List<String> segments = new ArrayList<>();
          segments.add(objectName.getDomain());
          for (String s : objectName.getKeyPropertyListString().split(",")) {
              int index = s.indexOf('=');
              if (index < 0) {
                  continue;
              }
              String key = objectName.getKeyProperty(s.substring(0, index));
              if (s.substring(0, index).equals("type")) {
                  segments.add(1, key);
              } else {
                  segments.add(key);
              }
          }
  
          return segments;
      }
docs: see: <code>org.apache.karaf.management.KarafMBeanServerGuard#getNameSegments(javax.management.ObjectName)</code>
  
  Assuming <strong>full</strong> {@link ObjectName} (not null, not containing wildcards and other funny stuff),
  split objectName to elements used then co contruct ordered list of PIDs to check for MBean permissions.
  @return