/** * Returns a list of services matching provided service class/interface. <br> * </br> <b>CoreServices will be placed at the beginning of the list.</b> */ List<ServiceInfo> getServiceInfos(Class serviceClass) { final LinkedList<ServiceInfo> result = new LinkedList<ServiceInfo>(); for (ServiceInfo serviceInfo : services.values()) { if (serviceInfo.isInstanceOf(serviceClass)) { if (serviceInfo.isCoreService()) { result.addFirst(serviceInfo); } else { result.addLast(serviceInfo); } } } return result; }