Code example for Collection

Methods: add

0
Collection<Class<?>> impls = classes.get( type );
        if ( impls == null )
        { 
            impls = new LinkedHashSet<Class<?>>();
            classes.put( type, impls );
        } 
        impls.add( impl );
        return this;
    } 
 
    /** 
     * Sets the instances for a service. 
     *  
     * @param <T> The service type. 
     * @param type The interface describing the service, must not be {@code null}. 
     * @param services The instances of the service, must not be {@code null}. 
     * @return This locator for chaining, never {@code null}. 
     */ 
    public <T> DefaultServiceLocator setServices( Class<T> type, T... services )