All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.jbee.inject.Supplier Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
/*
 *  Copyright (c) 2012, Jan Bernitt 
 *			
 *  Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
 */
package se.jbee.inject;

/**
 * A {@link Supplier} is a source or factory for specific instances.
 * 
 * @author Jan Bernitt ([email protected])
 * 
 * @param 
 *            The type of the instance being resolved
 */
public interface Supplier {

	/**
	 * This {@link Supplier} is asked to supply the instance that should be used the given
	 * {@link Dependency}.
	 * 
	 * @param injector
	 *            The {@link Injector} is used to resolve {@link Dependency}s during a possible
	 *            object creation of the returned instance.
	 * @return the instance created or resolved.
	 */
	T supply( Dependency dependency, Injector injector );

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy