code: static List<ScriptObjectMirror> getModulesByType(String type,Object value) {
          //print("getModuleByType: " + type + ":" + value);
          List<ScriptObjectMirror> list = new ArrayList<>();
          ScriptObjectMirror requires = requires();
  
          //print("ModuleUtils.getRequiredFileById for modid: "+modid);
          for ( Map.Entry<String,Object> entry : requires.entrySet()) {
  
              if (entry.getValue() instanceof ScriptObjectMirror)
              {
                  ScriptObjectMirror som = (ScriptObjectMirror)entry.getValue();
                  Object v = som.getMember(type);
                  if (value.equals(v))
                      list.add(som);
              }
          }
          return list;
      }
docs: /*
  Get any modules that match the given type/attribute.
  
  For example {type: "core", value: "true"} to find any core modules loaded from
  the classpath.