code: public static List<InstanceModel> instances(BundleContext context) {
          List<InstanceModel> instances = new ArrayList<>();
          try {
              for (ServiceReference ref : context.getServiceReferences(Architecture.class, null)) {
                  instances.add(new InstanceModel((Architecture) context.getService(ref)));
              }
          } catch (InvalidSyntaxException e) { //NOSONAR
              // Ignore it.
          }
          return instances;
      }
docs: Creates the list of instance models from all {@link org.apache.felix.ipojo.architecture.Architecture} service
  published in the service registry.
  
  @param context the bundle context
  @return the list of models, empty if none.