View Javadoc

1   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   class ConvertReflectedTypeToReflectedTypeAssignableMatcher
10          implements Converter<FluentClass<?>, Matcher<FluentClass<?>>> {
11      @Override
12      public Matcher<FluentClass<?>> convert(final FluentClass<?> from) {
13          if (from == null) {
14              return anyReflectedType();
15          }
16          return assignableFrom(from);
17      }
18  }