se.jbee.inject.util.Factory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of silk-di Show documentation
Show all versions of silk-di Show documentation
Silk Java dependency injection framework
/*
* 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.util;
import se.jbee.inject.Instance;
import se.jbee.inject.Supplier;
/**
* A slightly more high level abstraction than a {@link Supplier} purely for ease of implementation
* of sources that behave like a classical factory (pattern).
*
* @see Supplier
* @see Provider
*
* @author Jan Bernitt ([email protected])
*
* @param
* The type of value produced
*/
public interface Factory {
/**
* @param
* The type of the receiving instance.
* @param produced
* Describes what should be produced.
* @param injected
* Describes the instance that receives the produced instance.
* @return produced instance
*/
T produce( Instance super T> produced, Instance
injected );
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy