crazyboblee | 7289ac1 | 2007-02-01 00:28:09 +0000 | [diff] [blame^] | 1 | // Copyright 2006 Google Inc. All Rights Reserved. |
| 2 | |
| 3 | package com.google.inject; |
| 4 | |
| 5 | /** |
| 6 | * @author crazybob@google.com (Bob Lee) |
| 7 | */ |
| 8 | class InternalFactoryToFactoryAdapter<T> implements InternalFactory<T> { |
| 9 | |
| 10 | private final Factory<? extends T> factory; |
| 11 | |
| 12 | public InternalFactoryToFactoryAdapter(Factory<? extends T> factory) { |
| 13 | this.factory = factory; |
| 14 | } |
| 15 | |
| 16 | public T get(InternalContext context) { |
| 17 | return factory.get(); |
| 18 | } |
| 19 | |
| 20 | public String toString() { |
| 21 | return factory.toString(); |
| 22 | } |
| 23 | } |