15d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin/*
25d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * Copyright (C) 2014 Google, Inc.
35d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin *
45d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * Licensed under the Apache License, Version 2.0 (the "License");
55d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * you may not use this file except in compliance with the License.
65d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * You may obtain a copy of the License at
75d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin *
85d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * http://www.apache.org/licenses/LICENSE-2.0
95d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin *
105d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * Unless required by applicable law or agreed to in writing, software
115d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * distributed under the License is distributed on an "AS IS" BASIS,
125d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * See the License for the specific language governing permissions and
145d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * limitations under the License.
155d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin */
165d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffinpackage dagger.internal;
175d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin
185d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffinimport javax.inject.Inject;
195d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffinimport javax.inject.Provider;
205d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffinimport javax.inject.Scope;
215d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin
225d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin/**
235d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * An {@linkplain Scope unscoped} {@link Provider}. While a {@link Provider} <i>may<i> apply
245d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * scoping semantics while providing an instance, a factory implementation is guaranteed to exercise
255d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * the binding logic ({@link Inject} constructors, {@link Provides} methods) upon each call to
265d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * {@link #get}.
275d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin *
285d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * <p>Note that while subsequent calls to {@link #get} will create new instances for bindings such
295d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * as those created by {@link Inject} constructors, a new instance is not guaranteed by all
305d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * bindings. For example, {@link Provides} methods may be implemented in ways that return the same
315d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * instance for each call.
325d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin *
335d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * @author Gregory Kick
345d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin * @since 2.0
355d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin */
365d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffinpublic interface Factory<T> extends Provider<T> {
375d3207ac2713386ed61c6ca8f0356e8f093a62e1Paul Duffin}
38