Lines Matching refs:category

59  * registered, it will be stored in the category defined by the
120 Class category = (Class)categories.next();
121 SubRegistry reg = new SubRegistry(this, category);
122 categoryMap.put(category, reg);
238 * is associated with the given category.
244 * it is deregistered from a category, for example if a
245 * category is removed or the registry is garbage collected.
248 * @param category the category under which to register the
252 * registered in the same category category.
256 * @exception IllegalArgumentException if there is no category
257 * corresponding to <code>category</code>.
259 * the <code>Class</code> defined by <code>category</code>.
262 Class<T> category) {
266 SubRegistry reg = (SubRegistry)categoryMap.get(category);
268 throw new IllegalArgumentException("category unknown!");
270 if (!category.isAssignableFrom(provider.getClass())) {
279 * is associated within each category present in the registry
285 * category it is registered under. Its
287 * it is deregistered from a category or when the registry is
309 * associated within each category present in the registry whose
315 * category it is registered under. Its
317 * it is deregistered from a category or when the registry is
336 * Removes a service provider object from the given category. If
349 * @param category the category from which to deregister the
353 * registered in the same category category,
358 * @exception IllegalArgumentException if there is no category
359 * corresponding to <code>category</code>.
361 * the class defined by <code>category</code>.
364 Class<T> category) {
368 SubRegistry reg = (SubRegistry)categoryMap.get(category);
370 throw new IllegalArgumentException("category unknown!");
372 if (!category.isAssignableFrom(provider.getClass())) {
427 * service providers in the given category. If
435 * @param category the category to be retrieved from.
440 * objects from the given category, possibly in order.
442 * @exception IllegalArgumentException if there is no category
443 * corresponding to <code>category</code>.
445 public <T> Iterator<T> getServiceProviders(Class<T> category,
447 SubRegistry reg = (SubRegistry)categoryMap.get(category);
449 throw new IllegalArgumentException("category unknown!");
480 * objects within a given category that satisfy a criterion
488 * @param category the category to be retrieved from.
495 * objects from the given category, possibly in order.
497 * @exception IllegalArgumentException if there is no category
498 * corresponding to <code>category</code>.
500 public <T> Iterator<T> getServiceProviders(Class<T> category,
503 SubRegistry reg = (SubRegistry)categoryMap.get(category);
505 throw new IllegalArgumentException("category unknown!");
507 Iterator iter = getServiceProviders(category, useOrdering);
548 * within a given category. If one or both objects are not
549 * currently registered within the given category, or if the
559 * @param category a <code>Class</code> object indicating the
560 * category under which the preference is to be established.
570 * @exception IllegalArgumentException if there is no category
571 * corresponding to <code>category</code>.
573 public <T> boolean setOrdering(Class<T> category,
582 SubRegistry reg = (SubRegistry)categoryMap.get(category);
584 throw new IllegalArgumentException("category unknown!");
595 * within a given category. If one or both objects are not
596 * currently registered within the given category, or if no
604 * @param category a <code>Class</code> object indicating the
605 * category under which the preference is to be disestablished.
615 * @exception IllegalArgumentException if there is no category
616 * corresponding to <code>category</code>.
618 public <T> boolean unsetOrdering(Class<T> category,
627 SubRegistry reg = (SubRegistry)categoryMap.get(category);
629 throw new IllegalArgumentException("category unknown!");
640 * under the given category.
642 * @param category the category to be emptied.
644 * @exception IllegalArgumentException if there is no category
645 * corresponding to <code>category</code>.
647 public void deregisterAll(Class<?> category) {
648 SubRegistry reg = (SubRegistry)categoryMap.get(category);
650 throw new IllegalArgumentException("category unknown!");
691 Class category;
699 public SubRegistry(ServiceRegistry registry, Class category) {
701 this.category = category;
715 rs.onRegistration(registry, category);
734 rs.onDeregistration(registry, category);
777 rs.onDeregistration(registry, category);