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 /** Binds to a constant value. */ 20 public interface ConstantBindingBuilder { 21 22 /** Binds constant to the given value. */ to(String value)23 void to(String value); 24 25 /** Binds constant to the given value. */ to(int value)26 void to(int value); 27 28 /** Binds constant to the given value. */ to(long value)29 void to(long value); 30 31 /** Binds constant to the given value. */ to(boolean value)32 void to(boolean value); 33 34 /** Binds constant to the given value. */ to(double value)35 void to(double value); 36 37 /** Binds constant to the given value. */ to(float value)38 void to(float value); 39 40 /** Binds constant to the given value. */ to(short value)41 void to(short value); 42 43 /** Binds constant to the given value. */ to(char value)44 void to(char value); 45 46 /** 47 * Binds constant to the given value. 48 * 49 * @since 3.0 50 */ to(byte value)51 void to(byte value); 52 53 /** Binds constant to the given value. */ to(Class<?> value)54 void to(Class<?> value); 55 56 /** Binds constant to the given value. */ to(E value)57 <E extends Enum<E>> void to(E value); 58 } 59