blob: 8cee4afaacd1fcfe1c4e63f7a0a2aa74ea7f3bc6 [file] [log] [blame]
crazyboblee6ab7e1f2006-12-02 00:20:36 +00001/**
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
17package com.google.inject;
18
19/**
kevinb9n6a565c72007-02-11 01:58:33 +000020 * 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
crazyboblee6ab7e1f2006-12-02 00:20:36 +000028 */
crazyboblee63b592b2007-01-25 02:45:24 +000029public interface Module {
crazyboblee6ab7e1f2006-12-02 00:20:36 +000030
crazyboblee7c5b2c42007-01-20 02:05:20 +000031 /**
kevinb9n6a565c72007-02-11 01:58:33 +000032 * Contributes bindings and other configurations to a container builder, so
33 * that the resulting {@link Container} will include this module properly set
34 * up.
crazyboblee7c5b2c42007-01-20 02:05:20 +000035 */
crazyboblee63b592b2007-01-25 02:45:24 +000036 void configure(ContainerBuilder builder);
crazyboblee6ab7e1f2006-12-02 00:20:36 +000037}