1 /* 2 * Copyright (C) 2008 Google Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.google.inject.spi; 18 19 import com.google.inject.Binding; 20 import java.lang.reflect.Method; 21 import java.util.List; 22 import java.util.Map; 23 import java.util.Set; 24 25 /** 26 * A binding to the constructor of a concrete clss. To resolve injections, an instance is 27 * instantiated by invoking the constructor. 28 * 29 * @author jessewilson@google.com (Jesse Wilson) 30 * @since 2.0 31 */ 32 public interface ConstructorBinding<T> extends Binding<T>, HasDependencies { 33 34 /** Gets the constructor this binding injects. */ getConstructor()35 InjectionPoint getConstructor(); 36 37 /** 38 * Returns all instance method and field injection points on {@code type}. 39 * 40 * @return a possibly empty set of injection points. The set has a specified iteration order. All 41 * fields are returned and then all methods. Within the fields, supertype fields are returned 42 * before subtype fields. Similarly, supertype methods are returned before subtype methods. 43 */ getInjectableMembers()44 Set<InjectionPoint> getInjectableMembers(); 45 46 /*if[AOP]*/ 47 /** 48 * Returns the interceptors applied to each method, in the order that they will be applied. 49 * 50 * @return a possibly empty map 51 */ getMethodInterceptors()52 Map<Method, List<org.aopalliance.intercept.MethodInterceptor>> getMethodInterceptors(); 53 /*end[AOP]*/ 54 } 55