1 package com.lexicalscope.fluentreflection;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import ch.lambdaj.function.convert.Converter;
20
21 import com.google.inject.TypeLiteral;
22
23 class ConvertTypeLiteralToReflectedType implements Converter<TypeLiteral<?>, FluentClass<?>> {
24 private final ReflectedTypeFactory reflectedTypeFactory;
25
26 public ConvertTypeLiteralToReflectedType(final ReflectedTypeFactory reflectedTypeFactory) {
27 this.reflectedTypeFactory = reflectedTypeFactory;
28 }
29
30 @Override public FluentClass<?> convert(final TypeLiteral<?> from) {
31 return reflectedTypeFactory.reflect(from);
32 }
33 }