crazyboblee | 6ab7e1f | 2006-12-02 00:20:36 +0000 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2006 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; |
| 18 | |
| 19 | /** |
kevinb9n | 6a565c7 | 2007-02-11 01:58:33 +0000 | [diff] [blame] | 20 | * A module contributes a set of configurations, typically interface bindings, |
| 21 | * to a {@link ContainerBuilder} which will later create a {@link Container}. |
| 22 | * Implementing this interface is the standard means for encapsulating and |
| 23 | * reusing configuration logic. Your Module classes can use a more streamlined |
| 24 | * syntax by extending {@link AbstractModule} rather than implementing this |
| 25 | * interface directly. |
| 26 | * |
| 27 | * @since 1.0 |
crazyboblee | 6ab7e1f | 2006-12-02 00:20:36 +0000 | [diff] [blame] | 28 | */ |
crazyboblee | 63b592b | 2007-01-25 02:45:24 +0000 | [diff] [blame] | 29 | public interface Module { |
crazyboblee | 6ab7e1f | 2006-12-02 00:20:36 +0000 | [diff] [blame] | 30 | |
crazyboblee | 7c5b2c4 | 2007-01-20 02:05:20 +0000 | [diff] [blame] | 31 | /** |
kevinb9n | 6a565c7 | 2007-02-11 01:58:33 +0000 | [diff] [blame] | 32 | * Contributes bindings and other configurations to a container builder, so |
| 33 | * that the resulting {@link Container} will include this module properly set |
| 34 | * up. |
crazyboblee | 7c5b2c4 | 2007-01-20 02:05:20 +0000 | [diff] [blame] | 35 | */ |
crazyboblee | 63b592b | 2007-01-25 02:45:24 +0000 | [diff] [blame] | 36 | void configure(ContainerBuilder builder); |
crazyboblee | 6ab7e1f | 2006-12-02 00:20:36 +0000 | [diff] [blame] | 37 | } |