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

se.jbee.inject.Injectron 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 kind of singleton for a {@link Resource} inside a {@link Injector}.
 * 
 * @author Jan Bernitt ([email protected])
 */
public interface Injectron
		extends Resourcing {

	/**
	 * @return The {@link Source} that {@link Injection} had been created from (e.g. did define the
	 *         bind).
	 */
	Source getSource();

	/**
	 * @return The instance created or resolved for the given {@link Dependency}.
	 */
	T instanceFor( Dependency dependency );

	/**
	 * @return The frequency in which this injectron's {@link Resource} expires.
	 */
	Expiry getExpiry();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy