Get all {@link ServiceReference} objects matching the fully qualified
class name given as an argument
339161
@Override
    public ServiceReference<?> getServiceReference(String clazz) {
    	Collection<ServiceReference<?>> servrefs = serviceRegistrations.get(clazz);
    	if (servrefs == null || servrefs.size() == 0) {
            return null;
    	}

        return servrefs.iterator().next();
    }
698512
private Map<String, String> loadProperties(ServiceReference reference) {
		log.trace("loadProperties");
		Map<String, String> properties = new HashMap<String, String>();

		properties.put("id", OsgiUtil.toString(
				reference.getProperty(Constants.SERVICE_ID), ""));
		properties.put("class", OsgiUtil.toString(
				reference.getProperty(Constants.SERVICE_PID), ""));
		properties.put("description", OsgiUtil.toString(
				reference.getProperty(Constants.SERVICE_DESCRIPTION), ""));
		properties.put(
				"vendor",
				OsgiUtil.toString(
						reference.getProperty(Constants.SERVICE_VENDOR), ""));
		properties
				.put("resourceTypes",
						Arrays.toString(OsgiUtil.toStringArray(
								reference
										.getProperty(ComponentBindingsProvider.RESOURCE_TYPE_PROP),
								new String[0])));
		properties.put("priority", OsgiUtil.toString(
				reference.getProperty(ComponentBindingsProvider.PRIORITY), ""));
		properties.put("bundle_id",
				String.valueOf(reference.getBundle().getBundleId()));
		properties.put("bundle_name", reference.getBundle().getSymbolicName());
		log.debug("Loaded properties {}", properties);
		return properties;
	}
380947
private Long fetchServiceId(ServiceReference serviceReference) {
        return (Long) serviceReference.getProperty(org.osgi.framework.Constants.SERVICE_ID);
    }
446810
@Override
    protected void findReferencedClassNames(final Set<String> classNames) {
        final TypeSignature methodSig = getTypeSignature();
        if (methodSig != null) {
            methodSig.findReferencedClassNames(classNames);
        }
        final TypeSignature methodDesc = getTypeDescriptor();
        if (methodDesc != null) {
            methodDesc.findReferencedClassNames(classNames);
        }
        if (annotationInfo != null) {
            for (final AnnotationInfo ai : annotationInfo) {
                ai.findReferencedClassNames(classNames);
            }
        }
    }
147846
@Override
    void findReferencedClassNames(final Set<String> classNameListOut) {
        if (classBound != null) {
            classBound.findReferencedClassNames(classNameListOut);
        }
        for (final ReferenceTypeSignature typeSignature : interfaceBounds) {
            typeSignature.findReferencedClassNames(classNameListOut);
        }
    }
568231
public static Map<String, String> toMap(ServiceReference reference)
    {
        LOGGER.entering(CLASS_NAME, "toMap", reference);

        Map<String, String> result = new Hashtable<String, String>();

        for (String key : reference.getPropertyKeys())
        {
            result.put(key, reference.getProperty(key).toString());
        }

        LOGGER.exiting(CLASS_NAME, "toMap", result);

        return result;
    }
1243404
@Override
  @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
  public List<ServerServiceDefinition> getServices() {
    return Collections.unmodifiableList(new ArrayList<>(services.values()));
  }
1077179
@Override
    public Collection<ServiceInstance<T>> queryForInstances(String name) throws Exception
    {
        return queryForInstances(name, null);
    }
454703
@Override
    protected void findReferencedClassNames(final Set<String> referencedClassNames) {
        if (this.referencedClassNames != null) {
            referencedClassNames.addAll(this.referencedClassNames);
        }
        getMethodInfo().findReferencedClassNames(referencedClassNames);
        getFieldInfo().findReferencedClassNames(referencedClassNames);
        getAnnotationInfo().findReferencedClassNames(referencedClassNames);
        if (annotationDefaultParamValues != null) {
            annotationDefaultParamValues.findReferencedClassNames(referencedClassNames);
        }
        final ClassTypeSignature classSig = getTypeSignature();
        if (classSig != null) {
            classSig.findReferencedClassNames(referencedClassNames);
        }
        // Remove any self-references
        referencedClassNames.remove(name);
    }
803766
private static List<ObjectContent> retrievePropertiesAllObjects(ConnectionResources connectionResources,
                                                                   List<PropertyFilterSpec> propertyFilterSpecList)
            throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg {

        VimPortType vimPort = connectionResources.getVimPortType();
        ManagedObjectReference serviceInstance = connectionResources.getServiceInstance();
        ServiceContent serviceContent = vimPort.retrieveServiceContent(serviceInstance);
        ManagedObjectReference propertyCollectorReference = serviceContent.getPropertyCollector();
        RetrieveOptions propertyObjectRetrieveOptions = new RetrieveOptions();
        List<ObjectContent> objectContentList = new ArrayList<>();

        RetrieveResult results = vimPort.retrievePropertiesEx(propertyCollectorReference,
                propertyFilterSpecList,
                propertyObjectRetrieveOptions);

        if (results != null && results.getObjects() != null && !results.getObjects().isEmpty()) {
            objectContentList.addAll(results.getObjects());
        }

        String token = null;
        if (results != null && results.getToken() != null) {
            token = results.getToken();
        }

        while (token != null && !token.isEmpty()) {
            results = vimPort.continueRetrievePropertiesEx(propertyCollectorReference, token);
            token = null;
            if (results != null) {
                token = results.getToken();
                if (results.getObjects() != null && !results.getObjects().isEmpty()) {
                    objectContentList.addAll(results.getObjects());
                }
            }
        }

        return objectContentList;
    }
290698
public List<ServiceRefType<WebAppDescriptor>> getAllServiceRef()
   {
      List<ServiceRefType<WebAppDescriptor>> list = new ArrayList<ServiceRefType<WebAppDescriptor>>();
      List<Node> nodeList = model.get("service-ref");
      for(Node node: nodeList)
      {
         ServiceRefType<WebAppDescriptor>  type = new ServiceRefTypeImpl<WebAppDescriptor>(this, "service-ref", model, node);
         list.add(type);
      }
      return list;
   }
755162
public Collection<ServiceReference> serviceReferences() {
    return serviceRegistrations.stream()
        .flatMap(sr -> sr.methods().stream().map(sm -> new ServiceReference(sm, sr, this)))
        .collect(Collectors.toList());
  }
493070
@FFDCIgnore(NamingException.class)
    private Object resolveJNDIObject(Object o, ServiceReference<?> ref, String[] objectClass, String bindingName, Hashtable<?, ?> envmt) throws Exception {
        if ("jndi".equals(ref.getProperty("osgi.jndi.service.origin")) || contains(objectClass, Reference.class.getName())) {
            try {
                Context context = new InitialContext(envmt);
                Name name = context.getNameParser("").parse(bindingName);
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "calling NamingManager.getObjectInstance", o, name, context, envmt);
                }
                return NamingManager.getObjectInstance(o, name, context, envmt);
            } catch (NamingException e) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "ignoring NamingException from NamingManager.getObjectInstance", e);
                }
                return null;
            }
        }

        return o;
    }
202793
public List<V> getAllServicesWithInstance(){
        if(cache == null || cache.size() == 0){
            return Collections.emptyList();
        }
        return Lists.newArrayList(cache.values());
    }
721475
public static Collection<Class<?>> serviceInterfaces(Object serviceObject) {
    Class<?>[] interfaces = serviceObject.getClass().getInterfaces();
    return Arrays.stream(interfaces)
        .filter(interfaceClass -> interfaceClass.isAnnotationPresent(Service.class))
        .collect(Collectors.toList());
  }
955651
public List<ServiceRefType<MessageDrivenBeanType<T>>> getAllServiceRef()
   {
      List<ServiceRefType<MessageDrivenBeanType<T>>> list = new ArrayList<ServiceRefType<MessageDrivenBeanType<T>>>();
      List<Node> nodeList = childNode.get("service-ref");
      for(Node node: nodeList)
      {
         ServiceRefType<MessageDrivenBeanType<T>>  type = new ServiceRefTypeImpl<MessageDrivenBeanType<T>>(this, "service-ref", childNode, node);
         list.add(type);
      }
      return list;
   }
815800
public List<PortComponentRefType<ServiceRefType<T>>> getAllPortComponentRef()
   {
      List<PortComponentRefType<ServiceRefType<T>>> list = new ArrayList<PortComponentRefType<ServiceRefType<T>>>();
      List<Node> nodeList = childNode.get("port-component-ref");
      for(Node node: nodeList)
      {
         PortComponentRefType<ServiceRefType<T>>  type = new PortComponentRefTypeImpl<ServiceRefType<T>>(this, "port-component-ref", childNode, node);
         list.add(type);
      }
      return list;
   }