se.jbee.inject.bootstrap.Bindings 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.bootstrap;
import se.jbee.inject.Resource;
import se.jbee.inject.Scope;
import se.jbee.inject.Source;
import se.jbee.inject.Supplier;
/**
* {@link Bindings} are an abstraction to a consumer of a binding described by a 4-tuple. They are
* usually accumulated within.
*
* Any builder is just a utility to construct calls to
* {@link #add(Resource, Supplier, Scope, Source)}
*
* @author Jan Bernitt ([email protected])
*/
public interface Bindings {
/**
* Add (accumulate) a binding described by the 4-tuple given.
*
* @param resource
* describes the identity of the resulting instance(s)
* @param supplier
* creates this instance(s)
* @param scope
* describes and controls the life-cycle of the instance(s)
* @param source
* describes the origin of the binding (this call) and its meaning
*/
void add( Resource resource, Supplier extends T> supplier, Scope scope, Source source );
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy