• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
21 import java.lang.reflect.Method;
22 import java.util.List;
23 import java.util.Map;
24 import java.util.Set;
25 
26 /**
27  * A binding to the constructor of a concrete clss. To resolve injections, an instance is
28  * instantiated by invoking the constructor.
29  *
30  * @author jessewilson@google.com (Jesse Wilson)
31  * @since 2.0
32  */
33 public interface ConstructorBinding<T> extends Binding<T>, HasDependencies {
34 
35   /**
36    * Gets the constructor this binding injects.
37    */
getConstructor()38   InjectionPoint getConstructor();
39 
40   /**
41    * Returns all instance method and field injection points on {@code type}.
42    *
43    * @return a possibly empty set of injection points. The set has a specified iteration order. All
44    *      fields are returned and then all methods. Within the fields, supertype fields are returned
45    *      before subtype fields. Similarly, supertype methods are returned before subtype methods.
46    */
getInjectableMembers()47   Set<InjectionPoint> getInjectableMembers();
48 
49   /*if[AOP]*/
50   /**
51    * Returns the interceptors applied to each method, in the order that they will be applied.
52    *
53    * @return a possibly empty map
54    */
getMethodInterceptors()55   Map<Method, List<org.aopalliance.intercept.MethodInterceptor>> getMethodInterceptors();
56   /*end[AOP]*/
57 }