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