1 /* 2 * Copyright (C) 2007 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.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 * @since 3.0 68 */ 69 void to(byte value); 70 71 /** 72 * Binds constant to the given value. 73 */ 74 void to(Class<?> value); 75 76 /** 77 * Binds constant to the given value. 78 */ 79 <E extends Enum<E>> void to(E value); 80 } 81