crazyboblee | e5fbbb0 | 2007-02-05 07:00:27 +0000 | [diff] [blame] | 1 | /** |
| 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 | |
| 17 | package com.google.inject; |
| 18 | |
crazyboblee | e5fbbb0 | 2007-02-05 07:00:27 +0000 | [diff] [blame] | 19 | import java.lang.annotation.ElementType; |
| 20 | import java.lang.annotation.Retention; |
| 21 | import static java.lang.annotation.RetentionPolicy.RUNTIME; |
kevinb9n | a99dca7 | 2007-02-11 04:48:57 +0000 | [diff] [blame] | 22 | import java.lang.annotation.Target; |
crazyboblee | e5fbbb0 | 2007-02-05 07:00:27 +0000 | [diff] [blame] | 23 | |
| 24 | /** |
crazyboblee | 61257a8 | 2007-03-03 00:23:40 +0000 | [diff] [blame] | 25 | * Apply this to implementation classes when you want only one instance |
| 26 | * (per {@link Injector}) to be reused for all injections for that binding. |
crazyboblee | e5fbbb0 | 2007-02-05 07:00:27 +0000 | [diff] [blame] | 27 | * |
| 28 | * @author crazybob@google.com (Bob Lee) |
| 29 | */ |
crazyboblee | 81303cd | 2007-05-09 00:44:37 +0000 | [diff] [blame] | 30 | @Target({ ElementType.TYPE, ElementType.METHOD }) |
crazyboblee | f33d23e | 2007-02-12 04:17:48 +0000 | [diff] [blame] | 31 | @Retention(RUNTIME) |
crazyboblee | 97b2cac | 2007-02-23 22:31:30 +0000 | [diff] [blame] | 32 | @ScopeAnnotation |
kevinb9n | a2915a9 | 2007-02-28 06:20:30 +0000 | [diff] [blame] | 33 | public @interface Singleton {} |