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 ConvertReflectedMethodToBoundReflectedMethod implements Converter<FluentMethod, FluentMethod> {
22 private final Object instance;
23 private final ReflectedTypeFactory reflectedTypeFactory;
24
25 public ConvertReflectedMethodToBoundReflectedMethod(final ReflectedTypeFactory reflectedTypeFactory, final Object instance) {
26 this.reflectedTypeFactory = reflectedTypeFactory;
27 this.instance = instance;
28 }
29
30 @Override
31 public FluentMethod convert(final FluentMethod from) {
32 return new BoundFluentMethodImpl(reflectedTypeFactory, from, instance);
33 }
34 }