176c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit/** 276c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * Copyright (C) 2008 Google Inc. 376c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * 476c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * Licensed under the Apache License, Version 2.0 (the "License"); 576c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * you may not use this file except in compliance with the License. 676c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * You may obtain a copy of the License at 776c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * 876c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * http://www.apache.org/licenses/LICENSE-2.0 976c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * 1076c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * Unless required by applicable law or agreed to in writing, software 1176c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * distributed under the License is distributed on an "AS IS" BASIS, 1276c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1376c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * See the License for the specific language governing permissions and 1476c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * limitations under the License. 1576c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit */ 1676c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit 1776c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkitpackage com.google.inject.spi; 1876c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit 1976c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkitimport com.google.inject.Binding; 20b7a02b02d81c830d148355c90bc309bcd66fb592sberlin 2176c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkitimport java.util.Set; 2276c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit 2376c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit/** 2476c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * A binding to a single instance. The same instance is returned for every injection. 2576c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * 2676c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * @author jessewilson@google.com (Jesse Wilson) 2776c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * @since 2.0 2876c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit */ 2976c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkitpublic interface InstanceBinding<T> extends Binding<T>, HasDependencies { 3076c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit 3176c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit /** 3276c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * Returns the user-supplied instance. 3376c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit */ 3476c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit T getInstance(); 3576c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit 3676c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit /** 3776c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * Returns the field and method injection points of the instance, injected at injector-creation 3876c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * time only. 3976c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * 4076c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit * @return a possibly empty set 4176c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit */ 4276c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit Set<InjectionPoint> getInjectionPoints(); 4376c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit 4476c24b172e5c4c4b6d51c10dd5c1f491a4033157limpbizkit} 45