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 */ to(String value)27 void to(String value); 28 29 /** 30 * Binds constant to the given value. 31 */ to(int value)32 void to(int value); 33 34 /** 35 * Binds constant to the given value. 36 */ to(long value)37 void to(long value); 38 39 /** 40 * Binds constant to the given value. 41 */ to(boolean value)42 void to(boolean value); 43 44 /** 45 * Binds constant to the given value. 46 */ to(double value)47 void to(double value); 48 49 /** 50 * Binds constant to the given value. 51 */ to(float value)52 void to(float value); 53 54 /** 55 * Binds constant to the given value. 56 */ to(short value)57 void to(short value); 58 59 /** 60 * Binds constant to the given value. 61 */ to(char value)62 void to(char value); 63 64 /** 65 * Binds constant to the given value. 66 * 67 * @since 3.0 68 */ to(byte value)69 void to(byte value); 70 71 /** 72 * Binds constant to the given value. 73 */ to(Class<?> value)74 void to(Class<?> value); 75 76 /** 77 * Binds constant to the given value. 78 */ to(E value)79 <E extends Enum<E>> void to(E value); 80 } 81