01: /*
02: * Copyright (C) 2007 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.binder;
18:
19: /**
20: * Binds to a constant value.
21: */
22: public interface ConstantBindingBuilder {
23:
24: /**
25: * Binds constant to the given value.
26: */
27: void to(String value);
28:
29: /**
30: * Binds constant to the given value.
31: */
32: void to(int value);
33:
34: /**
35: * Binds constant to the given value.
36: */
37: void to(long value);
38:
39: /**
40: * Binds constant to the given value.
41: */
42: void to(boolean value);
43:
44: /**
45: * Binds constant to the given value.
46: */
47: void to(double value);
48:
49: /**
50: * Binds constant to the given value.
51: */
52: void to(float value);
53:
54: /**
55: * Binds constant to the given value.
56: */
57: void to(short value);
58:
59: /**
60: * Binds constant to the given value.
61: */
62: void to(char value);
63:
64: /**
65: * Binds constant to the given value.
66: */
67: void to(Class<?> value);
68:
69: /**
70: * Binds constant to the given value.
71: */
72: <E extends Enum<E>> void to(E value);
73: }
|