1 | 130 | package com.lexicalscope.fluentreflection; |
2 | |
|
3 | |
import static com.lexicalscope.fluentreflection.ReflectionMatchers.*; |
4 | |
|
5 | |
import org.hamcrest.Matcher; |
6 | |
|
7 | |
import ch.lambdaj.function.convert.Converter; |
8 | |
|
9 | 522 | class ConvertClassToReflectedTypeAssignableMatcher implements Converter<Class<?>, Matcher<FluentClass<?>>> { |
10 | |
@Override |
11 | |
public Matcher<FluentClass<?>> convert(final Class<?> from) { |
12 | 130 | if (from == null) { |
13 | 32 | return anyReflectedType(); |
14 | |
} |
15 | 98 | return assignableFrom(from); |
16 | |
} |
17 | |
} |