code: public static PerfLevelDescriptor[] getInstrumentationLevel(DataDescriptor dd, boolean recursive) {
          if (disabled)
              return null;
  
          ModuleItem item = findModuleItem(dd);
          if (item == null) { // wrong moduleName
              return null;
          } else {
              if (!recursive) {
                  PerfLevelDescriptor[] pld = new PerfLevelDescriptor[1];
                  String[] path = item.getInstance().getPath();
                  PmiModule instance = item.getInstance();
                  pld[0] = new PerfLevelDescriptor(instance.getPath(),
                                  instance.getInstrumentationLevel(), instance.getModuleID());
  
                  return pld;
              } else {
                  ArrayList res = item.getPerfLevelDescriptors(false);
                  PerfLevelDescriptor[] pld = new PerfLevelDescriptor[res.size()];
                  for (int i = 0; i < pld.length; i++) {
                      pld[i] = (PerfLevelDescriptor) res.get(i);
                  }
                  return pld;
              }
          }
      }
docs: custom pmi : dd based API