ServiceRegistration serviceReg = (ServiceRegistration) serviceRegs.get(i);
ServiceRegistrationImpl serviceReg = (ServiceRegistrationImpl) serviceRegs.get(i);
	public void unpublishServices(BundleContext context) {		// Get all the Services published by the BundleContext.		ArrayList serviceRegs = (ArrayList) publishedServicesByContext.get(context);		if (serviceRegs != null) {			// Remove this list for the BundleContext			publishedServicesByContext.remove(context);			int size = serviceRegs.size();			for (int i = 0; i < size; i++) {				ServiceRegistration serviceReg = (ServiceRegistration) serviceRegs.get(i);				// Remove each service from the list of all published Services				allPublishedServices.remove(serviceReg);				// Remove each service from the list of Services published by Class Name. 				String[] clazzes = (String[]) serviceReg.getReference().getProperty(Constants.OBJECTCLASS);				int numclazzes = clazzes.length;				for (int j = 0; j < numclazzes; j++) {					String clazz = clazzes[j];					ArrayList services = (ArrayList) publishedServicesByClass.get(clazz);					services.remove(serviceReg);				}			}		}	}